Optional offset in ms to adjust for server time (default: 0)
Returns number|null
Time remaining in seconds, or null if no duration set
Remarks
Supports an optional server time offset to synchronize timers across clients
with different system clocks. The offset is calculated as: serverTime - clientTime.
A positive offset means the server is ahead of the client.
Example
// Without offset (uses client time) constremaining = getTimeRemaining(poll);
// With server time synchronization constserverOffset = serverTime - Date.now(); constremaining = getTimeRemaining(poll, serverOffset);
Get time remaining for a poll with duration.