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:
parent
3944c00f23
commit
dddd0e7b03
15 changed files with 341 additions and 64 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue