summaryrefslogtreecommitdiff
path: root/devdocs/elisp/processor-run-time.html
diff options
context:
space:
mode:
authorCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
committerCraig Jennings <c@cjennings.net>2024-04-07 13:41:34 -0500
commit754bbf7a25a8dda49b5d08ef0d0443bbf5af0e36 (patch)
treef1190704f78f04a2b0b4c977d20fe96a828377f1 /devdocs/elisp/processor-run-time.html
new repository
Diffstat (limited to 'devdocs/elisp/processor-run-time.html')
-rw-r--r--devdocs/elisp/processor-run-time.html17
1 files changed, 17 insertions, 0 deletions
diff --git a/devdocs/elisp/processor-run-time.html b/devdocs/elisp/processor-run-time.html
new file mode 100644
index 00000000..43fae869
--- /dev/null
+++ b/devdocs/elisp/processor-run-time.html
@@ -0,0 +1,17 @@
+ <h3 class="section">Processor Run time</h3> <p>Emacs provides several functions and primitives that return time, both elapsed and processor time, used by the Emacs process. </p> <dl> <dt id="emacs-uptime">Command: <strong>emacs-uptime</strong> <em>&amp;optional format</em>
+</dt> <dd>
+ <p>This function returns a string representing the Emacs <em>uptime</em>—the elapsed wall-clock time this instance of Emacs is running. The string is formatted by <code>format-seconds</code> according to the optional argument <var>format</var>. For the available format descriptors, see <a href="time-parsing">format-seconds</a>. If <var>format</var> is <code>nil</code> or omitted, it defaults to <code>"%Y, %D, %H, %M,
+%z%S"</code>. </p> <p>When called interactively, it prints the uptime in the echo area. </p>
+</dd>
+</dl> <dl> <dt id="get-internal-run-time">Function: <strong>get-internal-run-time</strong>
+</dt> <dd>
+<p>This function returns the processor run time used by Emacs, as a Lisp timestamp (see <a href="time-of-day">Time of Day</a>). </p> <p>Note that the time returned by this function excludes the time Emacs was not using the processor, and if the Emacs process has several threads, the returned value is the sum of the processor times used up by all Emacs threads. </p> <p>If the system doesn’t provide a way to determine the processor run time, <code>get-internal-run-time</code> returns the same time as <code>current-time</code>. </p>
+</dd>
+</dl> <dl> <dt id="emacs-init-time">Command: <strong>emacs-init-time</strong>
+</dt> <dd><p>This function returns the duration of the Emacs initialization (see <a href="startup-summary">Startup Summary</a>) in seconds, as a string. When called interactively, it prints the duration in the echo area. </p></dd>
+</dl><div class="_attribution">
+ <p class="_attribution-p">
+ Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
+ <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/Processor-Run-Time.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/Processor-Run-Time.html</a>
+ </p>
+</div>