Skip to content

Instantly share code, notes, and snippets.

@tuoxie007
Created April 22, 2014 08:02
Show Gist options
  • Save tuoxie007/11169388 to your computer and use it in GitHub Desktop.
Save tuoxie007/11169388 to your computer and use it in GitHub Desktop.
get-timestamp-in-c-language
#include <sys/time.h>
struct timeval tv;
gettimeofday(&tv, NULL);
double st = tv.tv_sec * 1.0 + tv.tv_usec / 1000000.0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment