Created
December 16, 2022 19:42
-
-
Save cmcdevitt/49f673ae5a7c40d0e42a7b41cdaa44fc to your computer and use it in GitHub Desktop.
Timing for JavaScript Function / Methods
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| //Top of Script / Function / Method | |
| var start; | |
| var end; | |
| var dur; | |
| start = new GlideDateTime(); | |
| // Function OR Method between start and end | |
| end = new GlideDateTime(); | |
| dur = GlideDateTime.subtract(start, end); | |
| gs.info("Duration for Function x is: " + dur.getDisplayValue()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment