Skip to content

Instantly share code, notes, and snippets.

@erikdubbelboer
Last active December 10, 2015 08:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erikdubbelboer/4405910 to your computer and use it in GitHub Desktop.
Save erikdubbelboer/4405910 to your computer and use it in GitHub Desktop.
Current time in milliseconds
#include <sys/time.h> // gettimeofday()
unsigned long int millitime() {
struct timeval t;
gettimeofday(&t, NULL);
return (t.tv_sec * 1000) + (t.tv_usec / 1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment