#!/usr/bin/python3
#
# Determine the duration of a specified test.
#

import datetime
import sys

import pscheduler

from ping_utils import *

spec = pscheduler.json_load(exit_on_error=True)['spec']


pscheduler.succeed_json({
        "duration": pscheduler.timedelta_as_iso8601(ping_test_duration(spec))
})
