Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
C(gcc) Local Time and math.h Example
#include <stdio.h> #include <math.h> #include <time.h> /* Local Time Example By Ice Scripter Note to self: Add "-lm" at the end of Comp Args if you're using the math.h lib */ int main() { int osTime = time(0); // Keeping a consistant time // printf("hr;mi;se\n\n"); printf("%d:%d:%d\n", (int)ceil(osTime/60/60)%24, // Converting to int (int)ceil(osTime/60) %60, // " " osTime %60 // No need for ceil // ); }
run
|
edit
|
history
|
help
1
C_141113_dividirRestasSucesivas
1.9 Time Function
Project 4 v0.1
Finite State Machine Program Example (ECE 2534)
sum of arrays
Null deref
sample.c
digitodentrodenumero
Ptr_to_fct__v2
Intro coding hello world