MCPcopy Create free account
hub / github.com/AppleWin/AppleWin / SysClk_InitTimer

Function SysClk_InitTimer

source/SoundCore.cpp:506–523  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

504
505
506bool 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
525void SysClk_UninitTimer()
526{

Callers 1

OneTimeInitializationFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected