shithub: mc

ref: 48d725508d3c6759e9560c26f87de19acd5c5b59
dir: /lib/std/units.myr/

View raw version
use "types"

pkg std =
	/* JEDEC 100B.1 memory sizes */
	generic KiB	: @a::(integral,numeric)	= 1024 
	generic MiB	: @a::(integral,numeric)	= KiB*1024
	generic GiB	: @a::(integral,numeric)	= MiB*1024
	generic TiB	: @a::(integral,numeric)	= GiB*1024
	generic PiB	: @a::(integral,numeric)	= TiB*1024
	generic EiB	: @a::(integral,numeric)	= PiB*1024
	generic ZiB	: @a::(integral,numeric)	= EiB*1024
	generic YiB	: @a::(integral,numeric)	= ZiB*1024

	generic Sec	: time	= 1_000_000
	generic Msec	: time	= 1_000
	generic Usec	: time	= 1
;;