Skip to content

Commit

Permalink
Preserve the type of the trace time in Task::trace_time()
Browse files Browse the repository at this point in the history
FrameTime is a long (int64 in the trace) while trace_time() casts it to a u32.
Preserve the original type by making the function return type FrameTime.
  • Loading branch information
sidkshatriya committed Apr 15, 2024
1 parent 126ceea commit 30f1c51
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Task.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1974,7 +1974,7 @@ const string& Task::trace_dir() const {
return trace->dir();
}

uint32_t Task::trace_time() const {
FrameTime Task::trace_time() const {
const TraceStream* trace = trace_stream();
return trace ? trace->time() : 0;
}
Expand Down
2 changes: 1 addition & 1 deletion src/Task.h
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ class Task {
* events. |task_time()| returns that "time" wrt this task
* only.
*/
uint32_t trace_time() const;
FrameTime trace_time() const;

/**
* Call this to reset syscallbuf_hdr->num_rec_bytes and zero out the data
Expand Down

0 comments on commit 30f1c51

Please sign in to comment.