2016-11-18 3 views

答えて

1

プリプロセッサーのタイマーティックを定義することは可能ですか?

確かです。

擬似コード:

#define LOG_MESSAGE(args)  \ 
    if (enoughTimeHasPassed()) \ 
    {       \ 
    log_message(args);  \ 
    } 

int enoughTimeHasPassed() 
{ 
    // Return true/false based on whether enough time has passed 
    // since the last call to the function. 
} 

void log_message(argtype args) 
{ 
    // Implement the logic to log the message 
} 
関連する問題