diff options
Diffstat (limited to 'migration.c')
-rw-r--r-- | migration.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/migration.c b/migration.c index 748752e82..190b37e55 100644 --- a/migration.c +++ b/migration.c @@ -118,6 +118,25 @@ uint64_t migrate_max_downtime(void) return max_downtime; } +void do_migrate_set_downtime(Monitor *mon, const char *value) +{ + char *ptr; + double d; + + d = strtod(value, &ptr); + if (!strcmp(ptr,"ms")) { + d *= 1000000; + } else if (!strcmp(ptr,"us")) { + d *= 1000; + } else if (!strcmp(ptr,"ns")) { + } else { + /* all else considered to be seconds */ + d *= 1000000000; + } + + max_downtime = (uint64_t)d; +} + void do_info_migrate(Monitor *mon) { MigrationState *s = current_migration; |