MCPcopy Create free account
hub / github.com/NetHack/NetHack / spot_time_expires

Function spot_time_expires

src/timeout.c:2444–2456  ·  view source on GitHub ↗

* When is the spot timer of type func_index going to expire? * Returns 0L if no such timer. */

Source from the content-addressed store, hash-verified

2442 * Returns 0L if no such timer.
2443 */
2444long
2445spot_time_expires(coordxy x, coordxy y, short func_index)
2446{
2447 timer_element *curr;
2448 long where = (((long) x << 16) | ((long) y));
2449
2450 for (curr = gt.timer_base; curr; curr = curr->next) {
2451 if (curr->kind == TIMER_LEVEL && curr->func_index == func_index
2452 && curr->arg.a_long == where)
2453 return curr->timeout;
2454 }
2455 return 0L;
2456}
2457
2458long
2459spot_time_left(coordxy x, coordxy y, short func_index)

Callers 3

nhl_timer_has_atFunction · 0.85
nhl_timer_peek_atFunction · 0.85
spot_time_leftFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected