Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
timestamp
#include <stdio.h>
#include <time.h>
void ptimestamp_micro(struct timespec *now, char *text)
{
long us = (now->tv_sec * 1000000) + (now->tv_nsec / 1000);
printf("%ld%s", us, text);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment