Skip to content

Commit 2777955

Browse files
committed
Document unity exec time options.
1 parent 64939db commit 2777955

2 files changed

Lines changed: 29 additions & 1 deletion

File tree

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) <year> 2007-23 Mike Karlesky, Mark VanderVoord, Greg Williams
3+
Copyright (c) <year> 2007-24 Mike Karlesky, Mark VanderVoord, Greg Williams
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

docs/UnityConfigurationGuide.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,34 @@ _Example:_
482482
#define UNITY_OUTPUT_COLOR
483483
```
484484

485+
#### `UNITY_INCLUDE_EXEC_TIME`
486+
487+
Define this to measure and report execution time for each test in the suite. When enabled, Unity will do
488+
it's best to automatically find a way to determine the time in milliseconds. On most Windows, macos, or
489+
Linux environments, this is automatic. If not, you can give Unity more information.
490+
491+
#### `UNITY_CLOCK_MS`
492+
493+
If you're working on a system (embedded or otherwise) which has an accessible millisecond timer. You can
494+
define `UNITY_CLOCK_MS` to be the name of the function which returns the millisecond timer. It will then
495+
attempt to use that function for timing purposes.
496+
497+
#### `UNITY_EXEC_TIME_START`
498+
499+
Define this hook to start a millisecond timer if necessary.
500+
501+
#### `UNITY_EXEC_TIME_STOP`
502+
503+
Define this hook to stop a millisecond timer if necessary.
504+
505+
#### `UNITY_PRINT_EXEC_TIME`
506+
507+
Define this hook to print the current execution time. Used to report the milliseconds elapsed.
508+
509+
#### `UNITY_TIME_TYPE`
510+
511+
Finally, this can be set to the type which holds the millisecond timer.
512+
485513
#### `UNITY_SHORTHAND_AS_INT`
486514

487515
#### `UNITY_SHORTHAND_AS_MEM`

0 commit comments

Comments
 (0)