Skip to content

Commit

Permalink
Merge pull request awslabs#62 from quasi-mod/master
Browse files Browse the repository at this point in the history
Modify return value of get_boot_time to time_t
  • Loading branch information
emanuelem authored Jan 5, 2019
2 parents b70153a + 1a24953 commit 5b78af2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ struct process {
//ppid of the process
pid_t ppid;
//start time (unix timestamp)
int starttime;
time_t starttime;
//cputime used by the process (in milliseconds)
int cputime;
//actual cpu usage estimation (value in range 0-1)
Expand All @@ -66,7 +66,7 @@ struct process_filter {
struct process_iterator {
#ifdef __linux__
DIR *dip;
int boot_time;
time_t boot_time;
#elif defined __FreeBSD__
kvm_t *kd;
struct kinfo_proc *procs;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

#include <sys/vfs.h>

static int get_boot_time()
static time_t get_boot_time()
{
int uptime = 0;
FILE *fp = fopen ("/proc/uptime", "r");
Expand Down

0 comments on commit 5b78af2

Please sign in to comment.