I tried something like this, with no success \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 Example like <$button> Test <<run-n-time macro:"myMac" timerTid:"myTime">> </$button> Elapsed time: <$macrocall $name="show-diff" timerTiddler="myTime" /> Or call timer directly before and after macro call! This is what I use in Fortran, Matlab or Python! --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+unsubscr...@googlegroups.com. To post to this group, send email to tiddlywiki@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/e4009c8c-6287-4c6b-a63a-392cf3cb91df%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.