//Use highest available resolution time source
const source = typeof performance === "undefined" ? Date : performance;

/**
 * Current time in seconds
 * @returns {number}
 */
export function current_time_in_seconds() {
    // time source produces value in milliseconds, we need to scale to seconds
    return source.now() * 1e-3;
}
