yum-archive/TaSTT-Whisper
High-performance GPGPU inference of OpenAI's Whisper automatic speech recognition (ASR) model
git clone https://git.yummers.dev/yum-archive/TaSTT-Whisper
cacec67
master
1#pragma once 2#include <atlbase.h> 3 4// Utility class implementing a high-resolution Sleep() function 5class DelayExecution 6{ 7using pfnDelay = void (* )(const DelayExecution & de ); 8pfnDelay pfn = nullptr ; 9CHandle timer ; 10 11static void sleepOnTheTimer (const DelayExecution & delay ); 12static void spinWait (const DelayExecution & ); 13static void sleep (const DelayExecution & ); 14 15public : 16DelayExecution (); 17DelayExecution (const DelayExecution & )= delete ; 18 ~DelayExecution ()= default ; 19 20void delay ()const 21 { 22pfn (* this ); 23 } 24};