Improve code of commit 76c89b8.

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/6/head r14.1.0
Michele Calgaro 2 years ago
parent 76c89b83c5
commit f8453ccf3e
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -67,8 +67,8 @@ void KJSCPUGuard::start(unsigned int ms, unsigned int i_ms)
{
oldAlarmHandler = signal(SIGVTALRM, alarmHandler);
itimerval tv = {
{ static_cast<__time_t>( i_ms / 1000 ), static_cast<__suseconds_t>( (i_ms % 1000) * 1000 ) },
{ static_cast<__time_t>( ms / 1000 ), static_cast<__suseconds_t>( (ms % 1000) * 1000 ) }
{ static_cast<time_t>( i_ms / 1000 ), static_cast<suseconds_t>( (i_ms % 1000) * 1000 ) },
{ static_cast<time_t>( ms / 1000 ), static_cast<suseconds_t>( (ms % 1000) * 1000 ) }
};
setitimer(ITIMER_VIRTUAL, &tv, &oldtv);
}

Loading…
Cancel
Save