diff options
Diffstat (limited to 'procps')
-rw-r--r-- | procps/nmeter.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/procps/nmeter.c b/procps/nmeter.c index 07b7abe2f..f08938654 100644 --- a/procps/nmeter.c +++ b/procps/nmeter.c | |||
@@ -952,11 +952,11 @@ int nmeter_main(int argc UNUSED_PARAM, char **argv) | |||
952 | reset_outbuf(); | 952 | reset_outbuf(); |
953 | 953 | ||
954 | if (G.delta >= 0) { | 954 | if (G.delta >= 0) { |
955 | gettimeofday(&G.tv, NULL); | 955 | xgettimeofday(&G.tv); |
956 | usleep(G.delta > 1000000 ? 1000000 : G.delta - G.tv.tv_usec % G.deltanz); | 956 | usleep(G.delta > 1000000 ? 1000000 : G.delta - G.tv.tv_usec % G.deltanz); |
957 | } | 957 | } |
958 | 958 | ||
959 | gettimeofday(&G.start, NULL); | 959 | xgettimeofday(&G.start); |
960 | G.tv = G.start; | 960 | G.tv = G.start; |
961 | while (1) { | 961 | while (1) { |
962 | collect_info(first); | 962 | collect_info(first); |
@@ -971,7 +971,7 @@ int nmeter_main(int argc UNUSED_PARAM, char **argv) | |||
971 | if (G.delta >= 0) { | 971 | if (G.delta >= 0) { |
972 | int rem; | 972 | int rem; |
973 | // can be commented out, will sacrifice sleep time precision a bit | 973 | // can be commented out, will sacrifice sleep time precision a bit |
974 | gettimeofday(&G.tv, NULL); | 974 | xgettimeofday(&G.tv); |
975 | if (need_seconds) | 975 | if (need_seconds) |
976 | rem = G.delta - ((ullong)G.tv.tv_sec*1000000 + G.tv.tv_usec) % G.deltanz; | 976 | rem = G.delta - ((ullong)G.tv.tv_sec*1000000 + G.tv.tv_usec) % G.deltanz; |
977 | else | 977 | else |
@@ -983,7 +983,7 @@ int nmeter_main(int argc UNUSED_PARAM, char **argv) | |||
983 | } | 983 | } |
984 | usleep(rem); | 984 | usleep(rem); |
985 | } | 985 | } |
986 | gettimeofday(&G.tv, NULL); | 986 | xgettimeofday(&G.tv); |
987 | } | 987 | } |
988 | 988 | ||
989 | /*return 0;*/ | 989 | /*return 0;*/ |