MCPcopy Index your code
hub / github.com/NetHack/NetHack / dosuspend_core

Function dosuspend_core

src/cmd.c:5661–5678  ·  view source on GitHub ↗

^Z command, #suspend */

Source from the content-addressed store, hash-verified

5659
5660/* ^Z command, #suspend */
5661staticfn int
5662dosuspend_core(void)
5663{
5664#ifdef SUSPEND
5665 /* Does current window system support suspend? */
5666 if ((*windowprocs.win_can_suspend)()) {
5667 time_t now = getnow();
5668
5669 urealtime.realtime += timet_delta(now, urealtime.start_timing);
5670 urealtime.start_timing = now; /* as a safeguard against panic save */
5671 /* NB: SYSCF SHELLERS handled in port code. */
5672 dosuspend();
5673 urealtime.start_timing = getnow(); /* resume keeping track of time */
5674 } else
5675#endif
5676 Norep(cmdnotavail, "#suspend");
5677 return ECMD_OK;
5678}
5679
5680/* '!' command, #shell */
5681staticfn int

Callers

nothing calls this directly

Calls 4

getnowFunction · 0.85
timet_deltaFunction · 0.85
NorepFunction · 0.85
dosuspendFunction · 0.50

Tested by

no test coverage detected