Created
October 17, 2014 18:20
-
-
Save erichschroeter/499505824efcb23bc3fb to your computer and use it in GitHub Desktop.
timestamp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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