| 504 | |
| 505 | |
| 506 | bool SysClk_InitTimer() |
| 507 | { |
| 508 | g_hSemaphore = CreateSemaphore(NULL, 0, 1, NULL); // Max count = 1 |
| 509 | if (g_hSemaphore == NULL) |
| 510 | { |
| 511 | fprintf(stderr, "Error creating semaphore\n"); |
| 512 | return false; |
| 513 | } |
| 514 | |
| 515 | if (CoCreateInstance(CLSID_SystemClock, NULL, CLSCTX_INPROC, |
| 516 | IID_IReferenceClock, (LPVOID*)&g_pRefClock) != S_OK) |
| 517 | { |
| 518 | fprintf(stderr, "Error initialising COM\n"); |
| 519 | return false; // Fails for Win95! |
| 520 | } |
| 521 | |
| 522 | return true; |
| 523 | } |
| 524 | |
| 525 | void SysClk_UninitTimer() |
| 526 | { |
no outgoing calls
no test coverage detected