Improve code of commit 856ba6b4

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/182/head
Michele Calgaro 2 years ago
parent 856ba6b472
commit cc4de7a3cc
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

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

Loading…
Cancel
Save