xref: /src/sys/compat/linuxkpi/common/include/linux/units.h (revision 62f2367e2aac46194e4f97ff64ab32b82e4b8649)
162f2367eSJean-Sébastien Pédron /*-
262f2367eSJean-Sébastien Pédron  * Copyright (c) 2025 The FreeBSD Foundation
362f2367eSJean-Sébastien Pédron  * Copyright (c) 2025 Jean-Sébastien Pédron
462f2367eSJean-Sébastien Pédron  *
562f2367eSJean-Sébastien Pédron  * This software was developed by Jean-Sébastien Pédron under sponsorship
662f2367eSJean-Sébastien Pédron  * from the FreeBSD Foundation.
762f2367eSJean-Sébastien Pédron  *
862f2367eSJean-Sébastien Pédron  * Redistribution and use in source and binary forms, with or without
962f2367eSJean-Sébastien Pédron  * modification, are permitted provided that the following conditions
1062f2367eSJean-Sébastien Pédron  * are met:
1162f2367eSJean-Sébastien Pédron  * 1. Redistributions of source code must retain the above copyright
1262f2367eSJean-Sébastien Pédron  *    notice, this list of conditions and the following disclaimer.
1362f2367eSJean-Sébastien Pédron  * 2. Redistributions in binary form must reproduce the above copyright
1462f2367eSJean-Sébastien Pédron  *    notice, this list of conditions and the following disclaimer in the
1562f2367eSJean-Sébastien Pédron  *    documentation and/or other materials provided with the distribution.
1662f2367eSJean-Sébastien Pédron  *
1762f2367eSJean-Sébastien Pédron  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
1862f2367eSJean-Sébastien Pédron  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
1962f2367eSJean-Sébastien Pédron  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2062f2367eSJean-Sébastien Pédron  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
2162f2367eSJean-Sébastien Pédron  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2262f2367eSJean-Sébastien Pédron  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2362f2367eSJean-Sébastien Pédron  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2462f2367eSJean-Sébastien Pédron  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2562f2367eSJean-Sébastien Pédron  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2662f2367eSJean-Sébastien Pédron  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2762f2367eSJean-Sébastien Pédron  * SUCH DAMAGE.
2862f2367eSJean-Sébastien Pédron  */
2962f2367eSJean-Sébastien Pédron 
3062f2367eSJean-Sébastien Pédron #ifndef	_LINUXKPI_LINUX_UNITS_H_
3162f2367eSJean-Sébastien Pédron #define	_LINUXKPI_LINUX_UNITS_H_
3262f2367eSJean-Sébastien Pédron 
3362f2367eSJean-Sébastien Pédron #define	NANOHZ_PER_HZ	1000000000UL
3462f2367eSJean-Sébastien Pédron #define	MICROHZ_PER_HZ	1000000UL
3562f2367eSJean-Sébastien Pédron #define	MILLIHZ_PER_HZ	1000UL
3662f2367eSJean-Sébastien Pédron #define	HZ_PER_KHZ	1000UL
3762f2367eSJean-Sébastien Pédron #define	KHZ_PER_MHZ	1000UL
3862f2367eSJean-Sébastien Pédron #define	HZ_PER_MHZ	1000000UL
3962f2367eSJean-Sébastien Pédron 
4062f2367eSJean-Sébastien Pédron #endif /* _LINUXKPI_LINUX_UNITS_H_ */
41