Last active
September 3, 2016 07:40
-
-
Save randomdude999/ca30378c3d254fb6ed5c61c24e268b5c to your computer and use it in GitHub Desktop.
Patch for apt moo. (Apply to apt-private/private-moo.cc, apt version 1.3_rc4)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
68c68 | |
< std::cerr << getMooLine() << std::endl; | |
--- | |
> std::cerr << getMooLine(); // getMooLine already has a newline | |
166c166 | |
< time_t const timenow = time(NULL); | |
--- | |
> struct timespec timenow; | |
168c168,169 | |
< localtime_r(&timenow, &april); | |
--- | |
> clock_gettime(CLOCK_REALTIME, &timenow); | |
> localtime_r(&(timenow.tv_sec), &april); | |
182c183,184 | |
< SuperCow = 1 + (timenow % 4); | |
--- | |
> // timenow.tv_nsec is in nanosecs, divide by 1mln to get millisecs | |
> SuperCow = 1 + ((timenow.tv_nsec / 1000000) % 4); | |
184c186 | |
< SuperCow = 1 + (timenow % 3); | |
--- | |
> SuperCow = 1 + ((timenow.tv_nsec / 1000000) % 3); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment