ktime.h 950 B

12345678910111213141516171819202122232425262728293031
  1. /*
  2. * Copyright (c) 2006-2025, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. *
  6. * Change Logs:
  7. * Date Author Notes
  8. * 2025-01-01 RT-Thread Compatibility layer for legacy ktime API
  9. *
  10. * COMPATIBILITY HEADER:
  11. * This header provides backward compatibility for code using the old ktime API.
  12. * All rt_ktime_* APIs are now redirected to rt_clock_* APIs.
  13. *
  14. * The old ktime subsystem has been removed and replaced with the unified
  15. * clock_time subsystem. Include <drivers/clock_time.h> for new code.
  16. */
  17. #ifndef __KTIME_H__
  18. #define __KTIME_H__
  19. #ifdef RT_USING_CLOCK_TIME
  20. /* Include the unified clock_time header which provides all APIs */
  21. #include <drivers/clock_time.h>
  22. /* All rt_ktime_* APIs are already defined as macros in clock_time.h */
  23. #else
  24. #error "ktime subsystem has been removed. Please enable RT_USING_CLOCK_TIME in menuconfig."
  25. #endif /* RT_USING_CLOCK_TIME */
  26. #endif /* __KTIME_H__ */