💾 Archived View for gmi.noulin.net › gitRepositories › recordStdin › file › recordStdin.c.gmi captured on 2023-01-29 at 13:19:21. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
recordStdin.c (375B)
1 #! /usr/bin/env sheepy 2 3 #include "libsheepyObject.h" 4 5 int main(int ARGC, char** ARGV) { 6 7 char b[2*1024*1024]; 8 u64 startTime = getMonotonicTime(); 9 u64 currentTime = 0; 10 11 while (fgets(b, sizeof b, stdin)) { 12 currentTime = getMonotonicTime(); 13 printf("%d, %s", (int)((currentTime - startTime)/1000000),b); 14 startTime = currentTime; 15 } 16 }