Skip to content

Instantly share code, notes, and snippets.

@redraw
Created September 26, 2018 15:01
Show Gist options
  • Select an option

  • Save redraw/169d3238e313d495c7dc021fc971295d to your computer and use it in GitHub Desktop.

Select an option

Save redraw/169d3238e313d495c7dc021fc971295d to your computer and use it in GitHub Desktop.
#include<stdio.h>
#include<stdint.h>
#include<time.h>
#define Y2038 (int32_t)2147483647
int32_t ts;
void main() {
ts = (int32_t) time(NULL);
while (Y2038 - ts >= 0) {
ts += 60;
printf("%d\n", ts);
}
printf("******* Y2038! ********");
printf("\nHit any key to see following overflow integers\n");
while(1) {
printf("%d", ts++);
getchar();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment