\define run-n-time(macro, timerTid:"timerTid")
<$macrocall $name=timer timerTiddler=<<__timerTid__>> index=start/>
<$macrocall $name=<<__macro__>> />
<$macrocall $name=timer timerTiddler=<<__timerTid__>> index=stop/>
\end
\define timer(timerTiddler:"timerTid", index:"start")
<$action-setfield
$tiddler=<<__timerTiddler__>>
$index=<<__index__>>
$value=<<now [UTC]YYYY0MM0DD0hh0mm0ssXXX>> />
\end
\define show-diff(timerTiddler)
<$set name=start value={{{ [<__timerTiddler__>getindex[start]split[]rest[8]join[]trim[]] }}}>
<$set name=stop value={{{ [<__timerTiddler__>getindex[stop]split[]rest[8]join[]trim[]] }}}>
<$list filter="[<stop>subtract<start>]" variable=elapsedTime>
<$text text=<<elapsedTime>> />
</$list>
</$set>
</$set>
\end
<$button> Test <<run-n-time macro:"myMac" timerTid:"myTime">></$button>
Elapsed time:<$macrocall $name="show-diff" timerTiddler="myTime" />
Is there any code, macro, widget to calculate the elapsed time for any action in Tiddlywiki?Is there a simple timer macro to see the elapsed time when another macro performs a task?
performance: mainRender: 327.83msperformance: +filter: 49.70msperformance: styleRefresh: 9.14msperformance: +filter: 2.46msperformance: mainRefresh: 68.10msperformance: +filter: 37.69ms
--Mohammad--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/2456b5b8-8cfd-43d5-b6c4-28d76f649117%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.