* Enable the specified timeout to fire at the specified time. * * This is provided to support cases where there's a reason to calculate * the timeout by reference to some point other than "now". If there isn't, * use enable_timeout_after(), to avoid calling GetCurrentTimestamp() twice. */
| 559 | * use enable_timeout_after(), to avoid calling GetCurrentTimestamp() twice. |
| 560 | */ |
| 561 | void |
| 562 | enable_timeout_at(TimeoutId id, TimestampTz fin_time) |
| 563 | { |
| 564 | TimestampTz now; |
| 565 | |
| 566 | /* Disable timeout interrupts for safety. */ |
| 567 | disable_alarm(); |
| 568 | |
| 569 | /* Queue the timeout at the appropriate time. */ |
| 570 | now = GetCurrentTimestamp(); |
| 571 | enable_timeout(id, now, fin_time); |
| 572 | |
| 573 | /* Set the timer interrupt. */ |
| 574 | schedule_alarm(now); |
| 575 | } |
| 576 | |
| 577 | /* |
| 578 | * Enable multiple timeouts at once. |
nothing calls this directly
no test coverage detected