1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! The venue's clocks. Each field has its own unit, so each is converted by name, never by guess:
//! an order's expiry and a trade's `timestamp` are milliseconds, an order's `timestamp` and a
//! funding's are seconds, `transaction_time` and `last_updated_at` microseconds. There is no clock
//! here: the caller passes now, in milliseconds.
pub const SECOND_MS: u64 = 1_000;
pub const MINUTE_MS: u64 = 60 * SECOND_MS;
pub const HOUR_MS: u64 = 60 * MINUTE_MS;
pub const DAY_MS: u64 = 24 * HOUR_MS;
/// How long a transaction stays good after it is signed (lighter-go's `DefaultExpireTime`): ten
/// minutes less a second.
pub const TX_LIFETIME_MS: u64 = 10 * MINUTE_MS - SECOND_MS;
/// An order's expiry is between five minutes and thirty days ahead.
pub const MIN_ORDER_EXPIRY_MS: u64 = 5 * MINUTE_MS;
pub const MAX_ORDER_EXPIRY_MS: u64 = 30 * DAY_MS;
/// How long a resting order lives unless told otherwise: the venue's own apps' 28 days.
pub const RESTING_MS: u64 = 28 * DAY_MS;
/// Seconds as milliseconds.
pub const
/// Microseconds as whole milliseconds, the fraction dropped.
pub const
/// Milliseconds as whole seconds, the fraction dropped.
pub const