Created
January 15, 2021 07:15
-
-
Save alastorid/ecaeba6b3f2a521c25b28efd81ac0a2d to your computer and use it in GitHub Desktop.
get SystemTime the hacker way
This file contains 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
#include <stdio.h> | |
// windows only | |
#define GetTime() (*(volatile unsigned long*)0x7ffe0014) | |
int main() | |
{ | |
printf("enter q to leave\n"); | |
do | |
{ //KSYSTEM_TIME | |
printf("SystemTime = %ld", GetTime()); | |
}while('q' != getchar()); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment