Skip to content

Commit

Permalink
[runtime] Fix Process.TotalProcessorTime becoming negative. Fixes #19739
Browse files Browse the repository at this point in the history
.
  • Loading branch information
vargaz committed May 14, 2014
1 parent 11422b5 commit 4ba4b5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mono/io-layer/processes.c
Expand Up @@ -1644,9 +1644,9 @@ gboolean GetProcessTimes (gpointer process, WapiFileTime *create_time,
if (getrusage (RUSAGE_SELF, &time_data) == 0) {
guint64 tick_val;
ku_times_set = TRUE;
tick_val = time_data.ru_utime.tv_sec * 10000000 + time_data.ru_utime.tv_usec * 10;
tick_val = (guint64)time_data.ru_utime.tv_sec * 10000000 + (guint64)time_data.ru_utime.tv_usec * 10;
_wapi_guint64_to_filetime (tick_val, user_time);
tick_val = time_data.ru_stime.tv_sec * 10000000 + time_data.ru_stime.tv_usec * 10;
tick_val = (guint64)time_data.ru_stime.tv_sec * 10000000 + (guint64)time_data.ru_stime.tv_usec * 10;
_wapi_guint64_to_filetime (tick_val, kernel_time);
}
}
Expand Down

0 comments on commit 4ba4b5e

Please sign in to comment.