1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 22:08:12 +00:00

Get nyancat nyanning in Serenity.

I found a cute program that renders an animated nyancat in the terminal.
This patch adds enough hackery to get it working correctly. :^)
This commit is contained in:
Andreas Kling 2019-02-03 16:11:28 +01:00
parent 3944c00f23
commit dddd0e7b03
15 changed files with 341 additions and 64 deletions

View file

@ -1425,6 +1425,20 @@ int Process::sys$kill(pid_t pid, int signal)
return 0;
}
int Process::sys$usleep(useconds_t usec)
{
if (!usec)
return 0;
sleep(usec / 1000);
if (m_wakeup_time > system.uptime) {
ASSERT(m_was_interrupted_while_blocked);
dword ticks_left_until_original_wakeup_time = m_wakeup_time - system.uptime;
return ticks_left_until_original_wakeup_time / TICKS_PER_SECOND;
}
return 0;
}
int Process::sys$sleep(unsigned seconds)
{
if (!seconds)