Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include"windows.h"
- #include"stdio.h"
- #include"stdlib.h"
- unsigned long (*wra)();
- void douleia(){
- int i;
- for(i=0;i<2000000000;i++);
- return;
- }
- int main(){
- unsigned long arxh,telos;
- HMODULE hDLL;
- if(!(hDLL=LoadLibrary(TEXT("winmm.dll")))){
- printf("Den uposthrizetai h sunarthsh\n");
- system("pause");
- exit(1);
- }
- if(!(wra=GetProcAddress(hDLL,TEXT("timeGetTime")))){
- printf("Den uposthrizetai h sunarthsh\n");
- system("pause");
- exit(2);
- }
- arxh=(*wra)();
- douleia();
- telos=(*wra)();
- printf("Xronos: %.3f sec\n",(float)((telos-arxh)*.001));
- system("pause");
- return(0);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement