struct timespec tp;
time_t now;
- ret = clock_gettime(CLOCK_REALTIME, &tp);
+ ret = lttng_clock_gettime(CLOCK_REALTIME, &tp);
if (ret < 0) {
goto error;
}
/* Format time in the TLS variable. */
ret = snprintf(URCU_TLS(error_log_time).str, sizeof(URCU_TLS(error_log_time).str),
- "%02d:%02d:%02d.%06ld",
+ "%02d:%02d:%02d.%09ld",
tm.tm_hour, tm.tm_min, tm.tm_sec, tp.tv_nsec);
if (ret < 0) {
goto error;
[ ERROR_INDEX(LTTNG_ERR_KERN_CONTEXT_UNAVAILABLE) ] = "Context unavailable on this kernel",
[ ERROR_INDEX(LTTNG_ERR_REGEN_STATEDUMP_FAIL) ] = "Failed to regenerate the state dump",
[ ERROR_INDEX(LTTNG_ERR_REGEN_STATEDUMP_NOMEM) ] = "Failed to regenerate the state dump, not enough memory",
+ [ ERROR_INDEX(LTTNG_ERR_NOT_SNAPSHOT_SESSION) ] = "Snapshot command can't be applied to a non-snapshot session",
/* Last element */
[ ERROR_INDEX(LTTNG_ERR_NR) ] = "Unknown error code"