Skip to content

Instantly share code, notes, and snippets.

@kshimo69
Created January 20, 2010 06:30
Show Gist options
  • Save kshimo69/281655 to your computer and use it in GitHub Desktop.
Save kshimo69/281655 to your computer and use it in GitHub Desktop.
global epoc, hour, min, sec
probe begin {
print("hello world\n");
printf("epoctime:%d\n", gettimeofday_s());
epoc = gettimeofday_s();
hour = (epoc % (24 * 60 * 60)) / (60 * 60) + 9;
min = (epoc % (60 * 60)) / 60;
sec = epoc % 60;
printf("%d:%d:%d\n", hour, min, sec);
exit();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment