from yacl_base import *
from yacl_eval import *
from yacl_context import *
from yacl_execute import *


# Useful helpers to use in configs.

# These returns number of bytes. 1024 base is used, depsite them not named KiB, ...
def KB(x: int): return x * 1024
def MB(x: int): return x * 1048576
def GB(x: int): return x * 1073741824
def TB(x: int): return x * 1099511627776

# These return seconds (as float or int, depending what was on the input).
def ms(x: float): return x * 0.001
def seconds(x: float): return x
def minutes(x: float): return x * 60
def hours(x: float): return x * 3600
def days(x: float): return x * 86400
def weeks(x: float): return x * 604800
def years(x: float): return x * 604800 * 365
