TR181-XPON  1.4.0
TR-181 PON manager.
utils_time.c File Reference
#include "utils_time.h"
#include <sys/sysinfo.h>
#include "xpon_trace.h"

Go to the source code of this file.

Functions

uint32_t time_get_system_uptime (void)
 

Function Documentation

◆ time_get_system_uptime()

uint32_t time_get_system_uptime ( void  )

Return the uptime, i.e. the number of seconds since startup.

Definition at line 75 of file utils_time.c.

75  {
76  uint32_t uptime = 0;
77  struct sysinfo info;
78  when_failed_trace(sysinfo(&info), exit, ERROR, "Failed to get uptime");
79  uptime = info.uptime;
80 exit:
81  return uptime;
82 
83 }
Here is the caller graph for this function: