User Tools

Site Tools


en:examples:clocks:basic_clock

This is an old revision of the document!


Basic Clock

void orxFASTCALL DoSomethingUpdate(const orxCLOCK_INFO *_pstClockInfo, void *_pstContext){
   //Do something
}
 
orxSTATUS orxFASTCALL Init()
{
    orxCLOCK *pstDoSomethingClock = orxClock_Create(orx2F(2.0f), orxCLOCK_TYPE_USER); //every two seconds
    orxClock_Register(pstDoSomethingClock, DoSomethingUpdate, orxNULL, orxMODULE_ID_MAIN, orxCLOCK_PRIORITY_NORMAL);
}
en/examples/clocks/basic_clock.1518583661.txt.gz · Last modified: 2018/02/14 00:47 (7 years ago) (external edit)