<div dir="ltr"><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">If you would aks me, I would say that this simple functionality is available in FS and within 2 minutes I can google it. But now I am struggling for hours and can't find a solution to print, log... current time in microseconds or nanoseconds. If %q would work in strftime it would be a solution, but it doesn't work.</div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif"><br></div><div class="gmail_default" style="font-family:trebuchet ms,sans-serif">Is there another tool to display the current time in micro/nano seconds?</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 9 Nov 2022 at 12:10, Antony Stone <<a href="mailto:Antony.Stone@freeswitch.open.source.it">Antony.Stone@freeswitch.open.source.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Wednesday 09 November 2022 at 10:31:26, Gregor Nanger wrote:<br>
<br>
> now is by default, if you just use strftime. Try eval ${strftime()}<br>
<br>
Aha, yes, that works, and the (undocumented as far as I can see) %q parameter <br>
gives me nanoseconds.<br>
<br>
> Do you know how to print now in milliseconds like:<br>
> <action application="set" data="var_name=${utcnow}"/><br>
<br>
No :(<br>
<br>
I wanted microseconds, but %6q gives nothing, as does %3q (which I would <br>
expect to give milliseconds).<br>
<br>
So, %S.%q gives seconds + nanoseconds, but I don't see a way to reduce the <br>
resolution (interestingly, Asterisk's strftime function does support this, <br>
also with the %q parameter).<br>
<br>
<br>
Antony.<br>
<br>
> On Wed, 9 Nov 2022 at 10:22, Antony Stone wrote:<br>
> > On Tuesday 08 November 2022 at 23:55:18, Gregor Nanger wrote:<br>
> > > Antony, would strftime [format_string] do the job?<br>
> > <br>
> > Quite possibly, provided I can find a value of "now" to format with it.<br>
> > <br>
> > > On Sat, 5 Nov 2022 at 21:48, Piotr Gregor wrote:<br>
> > > > Antony,<br>
> > > > <br>
> > > > This sounds like a job for a module, especially that you mentioned<br>
> > > > you would like to upload/send it somewhere and combine it with data<br>
> > > > from other services.<br>
> > > > You create a module that exports one or more applications, you can<br>
> > > > call them from dialplan.<br>
> > > > <br>
> > > > best,<br>
> > > > <br>
> > > > <br>
> > > > Piotr Gregor<br>
<br>
-- <br>
You can spend the whole of your life trying to be popular,<br>
but at the end of the day the size of the crowd at your funeral<br>
will be largely dictated by the weather.<br>
<br>
- Frank Skinner<br>
<br>
Please reply to the list;<br>
please *don't* CC me.<br>
<br>
_________________________________________________________________________<br>
<br>
The FreeSWITCH project is sponsored by SignalWire <a href="https://signalwire.com" rel="noreferrer" target="_blank">https://signalwire.com</a><br>
Enhance your FreeSWITCH install with disruptive priced SMS and PSTN services.<br>
Build your next product on our scalable cloud platform.<br>
<br>
Join our online community to chat in real time <a href="https://signalwire.community" rel="noreferrer" target="_blank">https://signalwire.community</a><br>
<br>
Professional FreeSWITCH Services<br>
<a href="mailto:sales@freeswitch.com" target="_blank">sales@freeswitch.com</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a href="https://freeswitch.com/oss" rel="noreferrer" target="_blank">https://freeswitch.com/oss</a><br>
<a href="https://freeswitch.org/confluence" rel="noreferrer" target="_blank">https://freeswitch.org/confluence</a><br>
<a href="https://cluecon.com" rel="noreferrer" target="_blank">https://cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a href="mailto:FreeSWITCH-users@lists.freeswitch.org" target="_blank">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a href="http://lists.freeswitch.org/mailman/options/freeswitch-users" rel="noreferrer" target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a href="https://freeswitch.com" rel="noreferrer" target="_blank">https://freeswitch.com</a></blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><table border="0" style="font-size:12px;border:1px dashed rgb(187,187,187);font-family:sans-serif;width:537px"><tbody style="border-spacing:2px;border:0px none rgb(128,128,128)"><tr valign="top" style="border-spacing:2px;border:0px none rgb(128,128,128)"><td style="color:rgb(32,32,32);margin:8px;border-width:0px 1px 0px 0px;border-style:none solid none none;border-color:rgb(32,32,32) rgb(0,161,230) rgb(32,32,32) rgb(32,32,32);font-weight:bold;letter-spacing:1px;text-transform:capitalize;vertical-align:top;padding:1px 8px 1px 1px;width:63px;outline:rgb(32,32,32) none 0px;border-spacing:2px"><span style="color:rgb(0,161,230);outline:rgb(0,161,230) none 0px;border-spacing:2px;border:0px none rgb(0,161,230)"><font face="georgia, serif" size="2">Gregor Nanger</font></span><div style="font-size:17px;font-family:sans-serif;width:63px;outline:rgb(32,32,32) none 0px;border-spacing:2px;border:0px none rgb(32,32,32)"> </div></td><td style="margin:8px;border:0px none rgb(80,80,80);vertical-align:top;padding:1px 1px 1px 6px;width:354px;outline:rgb(80,80,80) none 0px;border-spacing:2px"><font face="georgia, serif" size="1"><b>CTO</b><br>t./f.: 00386 (0) 7 6000 308/309 • m:. 00386 (0)41 756485 <br>• Infomedia d.o.o. • Jerebova 3, Novo mesto, Slovenia <br>• <a href="http://www.infomedia.si" target="_blank">www.infomedia.si</a></font></td></tr></tbody></table></div></div>