namespace PhpefRuntimeNativeStandard {

    internal int64 microtime_current_usec() {
        return GLib.get_real_time();
    }

    internal double microtime_current_seconds() {
        return ((double) microtime_current_usec()) / 1000000.0;
    }

    internal string microtime_string_value() {
        int64 usec = microtime_current_usec();
        int64 sec = usec / 1000000;
        double fractional = ((double) (usec - (sec * 1000000))) / 1000000.0;
        return "%.8f %s".printf(fractional, sec.to_string());
    }
}
