emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Function to make a struct timespec from a floating point number?


From: Po Lu
Subject: Re: Function to make a struct timespec from a floating point number?
Date: Fri, 21 Jan 2022 09:37:25 +0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.60 (gnu/linux)

<tomas@tuxteam.de> writes:

> That might be `time-convert':
>
>   (let* ((tim0 (current-time))
>          (ftim (float-time tim0))
>        (tim1 (time-convert ftim)))
>     (message "tim0: %S ftim: %S tim1: %S\n" tim0 ftim tim1))
>
>   => tim0: (25065 42935 269749 160000) ftim: 1642702775.2697492 tim1: (25065 
> 42935 269749 164581)
>
> (some stuff in the lower bits seems to get lost in translation, alas :)

Thanks, but that wasn't what I was looking for, since it deals with Lisp
timestamps and not `struct timespec's on the C level.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]