Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Timestamp microsecond for C
//TIme microsecond //gcc 7.4.0 //QubCIA #include <stdio.h> #include <stdint.h> #include <sys/time.h> int main(void) { struct timeval now; uint64_t timestamp; /* * Current time, represented as seconds and microseconds since * January 1, 1970, 00:00:00 UTC. */ gettimeofday(&now, NULL); /* * Convert to delta in microseconds. */ timestamp = (uint64_t)now.tv_sec * 1000000 + (uint64_t)now.tv_usec; printf("Timeval Sec.Usec = %lu.%lu\n", (uint64_t)now.tv_sec, (uint64_t)now.tv_usec); printf("Timestamp = %llu\n", timestamp); return 0; }
run
|
edit
|
history
|
help
1
swap two numbers without arithematic operators
C_141210_Tartaglia
a.c
Midterm practice, turn into for loop
Coba
structt
recursive fundamentos
part 3
Kous
CALCULADORA