diff options
Diffstat (limited to 'include/migration/misc.h')
-rw-r--r-- | include/migration/misc.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/migration/misc.h b/include/migration/misc.h index d7892b7..60486d4 100644 --- a/include/migration/misc.h +++ b/include/migration/misc.h @@ -26,4 +26,14 @@ void blk_mig_init(void); static inline void blk_mig_init(void) {} #endif +#define SELF_ANNOUNCE_ROUNDS 5 + +static inline +int64_t self_announce_delay(int round) +{ + assert(round < SELF_ANNOUNCE_ROUNDS && round > 0); + /* delay 50ms, 150ms, 250ms, ... */ + return 50 + (SELF_ANNOUNCE_ROUNDS - round - 1) * 100; +} + #endif |