fuzion/std.fz
# This file is part of the Fuzion language implementation.
#
# The Fuzion language implementation is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, version 3 of the License.
#
# The Fuzion language implementation is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License along with The
# Fuzion language implementation. If not, see <https://www.gnu.org/licenses/>.
# -----------------------------------------------------------------------
#
# Tokiwa Software GmbH, Germany
#
# Source code of Fuzion standard library feature fuzion.std
#
# Author: Fridtjof Siebert (siebert@tokiwa.software)
#
# -----------------------------------------------------------------------
# fuzion.std -- unit type to group low-level std APIs
#
module fuzion.std is
# exit -- exit immediately with the given return code
#
module exit(code i32) void => intrinsic
# panic -- display a panic message and exit immediately with error code 1
#
module panic(msg String) void =>
fuzion.sys.err.println "*** panic: $msg"
std.this.exit 1
# no guarantee can be given for precision nor resolution
module nano_time u64 => intrinsic
# no guarantee can be given for precision nor resolution
module nano_sleep(n u64) is intrinsic
# fills arg with current UTC date time
module date_time(array_of_i32 fuzion.sys.Pointer) is intrinsic
last changed: 2024-03-07