summaryrefslogtreecommitdiff
path: root/epoch.c
diff options
context:
space:
mode:
Diffstat (limited to 'epoch.c')
-rw-r--r--epoch.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/epoch.c b/epoch.c
new file mode 100644
index 0000000..b1450db
--- /dev/null
+++ b/epoch.c
@@ -0,0 +1,12 @@
+#include <stdio.h>
+#include <time.h>
+
+int main() {
+ time_t now;
+
+ now = time(NULL); // Get current time
+
+ printf("Seconds since epoch: %ld\n", (long)now);
+
+ return 0;
+}