From 2777955d3a3275447ebcfca01b844ea6430c9fbb Mon Sep 17 00:00:00 2001 From: Mark VanderVoord Date: Sat, 9 Mar 2024 18:28:42 -0500 Subject: [PATCH] Document unity exec time options. --- LICENSE.txt | 2 +- docs/UnityConfigurationGuide.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/LICENSE.txt b/LICENSE.txt index a541b843..e12b59e6 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2007-23 Mike Karlesky, Mark VanderVoord, Greg Williams +Copyright (c) 2007-24 Mike Karlesky, Mark VanderVoord, Greg Williams Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/docs/UnityConfigurationGuide.md b/docs/UnityConfigurationGuide.md index 953851fd..0b735f7a 100644 --- a/docs/UnityConfigurationGuide.md +++ b/docs/UnityConfigurationGuide.md @@ -482,6 +482,34 @@ _Example:_ #define UNITY_OUTPUT_COLOR ``` +#### `UNITY_INCLUDE_EXEC_TIME` + +Define this to measure and report execution time for each test in the suite. When enabled, Unity will do +it's best to automatically find a way to determine the time in milliseconds. On most Windows, macos, or +Linux environments, this is automatic. If not, you can give Unity more information. + +#### `UNITY_CLOCK_MS` + +If you're working on a system (embedded or otherwise) which has an accessible millisecond timer. You can +define `UNITY_CLOCK_MS` to be the name of the function which returns the millisecond timer. It will then +attempt to use that function for timing purposes. + +#### `UNITY_EXEC_TIME_START` + +Define this hook to start a millisecond timer if necessary. + +#### `UNITY_EXEC_TIME_STOP` + +Define this hook to stop a millisecond timer if necessary. + +#### `UNITY_PRINT_EXEC_TIME` + +Define this hook to print the current execution time. Used to report the milliseconds elapsed. + +#### `UNITY_TIME_TYPE` + +Finally, this can be set to the type which holds the millisecond timer. + #### `UNITY_SHORTHAND_AS_INT` #### `UNITY_SHORTHAND_AS_MEM`