def in_seconds(days=0, hours=0, minutes=0, seconds=0):
    """
    Tiny helper that is similar to the timedelta API that turns the keyword arguments into
    seconds. Most useful for calculating the number of seconds relative to an epoch.

    >>> in_seconds()
    0
    >>> in_seconds(hours=1.5)
    5400
    >>> in_seconds(hours=3)
    10800
    >>> in_seconds(minutes=30)
    1800
    >>> in_seconds(hours=3, minutes=30, seconds=10)
    12610
    >>> in_seconds(days=1)
    86400
    >>> in_seconds(days=3, hours=10)
    295200
    """
    return int((days * 86400) + (hours * 3600) + (minutes * 60) + seconds)