Use clock_gettime() with CLOCK_MONOTONIC which is not affected by changing system...
[platform/core/multimedia/mmsvc-core.git] / server / src / muse_server_log.c
index 29fd9be..fbec3ab 100644 (file)
@@ -87,7 +87,7 @@ static void _ms_log_pid_time(ms_log_t *log, int pid)
        muse_return_if_fail(muse_core_fd_is_valid(log->fd));
        muse_return_if_fail(_ms_log_pid_is_valid(pid));
 
-       muse_core_get_cur_time(time_buf);
+       muse_core_get_cur_time(NULL, time_buf);
        snprintf(log_buf, MUSE_MSG_LEN_MAX, "[PID] %d %s", pid, time_buf);
 
        ms_log_write(log_buf);
@@ -285,7 +285,7 @@ static void _ms_log_cache_latest_msg(ms_log_t *log, int pid, char *msg)
 
        g_mutex_lock(&log->lock);
 
-       muse_core_get_cur_time(time_buf);
+       muse_core_get_cur_time(NULL, time_buf);
        snprintf(log->latest_msgs[log->cur_idx], MUSE_MSG_LEN_MAX, "[P%5d] %s %s", pid, time_buf, msg);
 
        log->cur_idx = (log->cur_idx + 1) % MUSE_LOG_MSG_NUM;