26 #include "rdk_logger_milestone.h"
29 #define MILESTONE_LOG_FILENAME "/opt/logs/rdk_milestones.log"
31 #define MILESTONE_LOG_FILENAME "/rdklogs/logs/rdk_milestones.log"
34 unsigned long long getUptimeMS(
void)
36 struct timespec uptime;
37 unsigned long long uptimems;
40 clock_gettime(CLOCK_MONOTONIC_RAW, &uptime);
41 uptimems = (
unsigned long long)uptime.tv_sec * 1000 + uptime.tv_nsec / 1000000;
46 void logMilestone(
const char *msg_code)
49 fp = fopen(MILESTONE_LOG_FILENAME,
"a+");
52 fprintf(fp,
"%s:%llu\n", msg_code, getUptimeMS());