[phobos] Is it possible to get Function Time in ticks like profiler give, but at runtime?

unDEFER 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>  
wrote:

> 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):
>> http://unde.sf.net/estimation-resources
>>
>> 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  
>> for
>> Linux getrusage is what I need.
>> As I understand there is no any universal methods to get this  
>> information
>> for any OS?
>
> There's pretty much nothing in terms of time-related functions - beyond  
> C's
> 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  
> pretty
> quickly. This is definitely the sort of thing that you're going to have  
> to
> handle differently on each OS that you're working with.
>
> - Jonathan M Davis
> _______________________________________________
> phobos mailing list
> phobos at puremagic.com
> http://lists.puremagic.com/mailman/listinfo/phobos


-- 
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  
documents


More information about the phobos mailing list