[phobos] Is it possible to get Function Time in ticks like profiler give, but at runtime?
undefer at gmail.com
Mon Aug 29 11:23:49 PDT 2011
Thank you, Jonathan, I will see methods for all target OS'es.
On Tue, 23 Aug 2011 09:50:12 +0400, Jonathan M Davis <jmdavisProg at gmx.com>
> On Sunday, August 21, 2011 05:21:02 unDEFER wrote:
>> If you really want to understand my goal you can try to read my the next
>> article (sorry for bad english):
>> If shortly I just want to estimate CPU using by program also as other
>> resources like memory.
>> I just try test `time` output (it prints user time and sys time for any
>> program in Linux) for loaded and not loaded system and looks like that
>> Linux getrusage is what I need.
>> As I understand there is no any universal methods to get this
>> for any OS?
> There's pretty much nothing in terms of time-related functions - beyond
> time function - which exist on all OSes. If you stick to just Posix,
> you do
> get a bit more - e.g. gettimeofday - but even then, it varies per OS
> quickly. This is definitely the sort of thing that you're going to have
> handle differently on each OS that you're working with.
> - Jonathan M Davis
> phobos mailing list
> phobos at puremagic.com
Nikolay Krivchenkov aka unDEFER
I want to believe... in unDE.su
registered Linux user #360474
Don't worry, I can read OpenOffice.org/Libre Office/Lotus Symphony
More information about the phobos