Signed-off-by: Rémi Lefèvre <remi.lefevre@parrot.com>
if(unlikely(!ff)) goto cleanup;
p->last_stat_collected_usec = p->stat_collected_usec;
if(unlikely(!ff)) goto cleanup;
p->last_stat_collected_usec = p->stat_collected_usec;
- p->stat_collected_usec = now_realtime_usec();
+ p->stat_collected_usec = now_monotonic_usec();
file_counter++;
// p->pid = str2ul(procfile_lineword(ff, 0, 0+i));
file_counter++;
// p->pid = str2ul(procfile_lineword(ff, 0, 0+i));
file_counter++;
p->last_io_collected_usec = p->io_collected_usec;
file_counter++;
p->last_io_collected_usec = p->io_collected_usec;
- p->io_collected_usec = now_realtime_usec();
+ p->io_collected_usec = now_monotonic_usec();
if(unlikely(!ff)) goto cleanup;
last_collected_usec = collected_usec;
if(unlikely(!ff)) goto cleanup;
last_collected_usec = collected_usec;
- collected_usec = now_realtime_usec();
+ collected_usec = now_monotonic_usec();
usec_t cpusyst;
if(!last.tv_sec) {
usec_t cpusyst;
if(!last.tv_sec) {
- now_realtime_timeval(&last);
+ now_monotonic_timeval(&last);
getrusage(RUSAGE_SELF, &me_last);
// the first time, give a zero to allow
getrusage(RUSAGE_SELF, &me_last);
// the first time, give a zero to allow
- now_realtime_timeval(&now);
+ now_monotonic_timeval(&now);
getrusage(RUSAGE_SELF, &me);
usec = dt_usec(&now, &last);
getrusage(RUSAGE_SELF, &me);
usec = dt_usec(&now, &last);
procfile_adaptive_initial_allocation = 1;
procfile_adaptive_initial_allocation = 1;
- time_t started_t = now_realtime_sec();
+ time_t started_t = now_monotonic_sec();
get_system_HZ();
get_system_pid_max();
get_system_cpus();
get_system_HZ();
get_system_pid_max();
get_system_cpus();
if(unlikely(debug))
fprintf(stderr, "apps.plugin: done Loop No %llu\n", global_iterations_counter);
if(unlikely(debug))
fprintf(stderr, "apps.plugin: done Loop No %llu\n", global_iterations_counter);
- time_t current_t = now_realtime_sec();
-
// restart check (14400 seconds)
// restart check (14400 seconds)
- if(current_t - started_t > 14400) exit(0);
+ if(now_monotonic_sec() - started_t > 14400) exit(0);