comp.lang.ada
 help / color / mirror / Atom feed
* User and system time
@ 2000-11-01 14:15 Espen Stranger Seland
  2000-11-01 15:42 ` Larry Kilgallen
  2000-11-01 16:51 ` Robert Dewar
  0 siblings, 2 replies; 8+ messages in thread
From: Espen Stranger Seland @ 2000-11-01 14:15 UTC (permalink / raw)


How can I read the system and user time?
It is to get stats fra tasks.


-espen
--
It's not whether you win or lose,
but how you place the blame. 
http://www.stud.ifd.hibu.no/espenss/



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: User and system time
  2000-11-01 14:15 User and system time Espen Stranger Seland
@ 2000-11-01 15:42 ` Larry Kilgallen
  2000-11-01 16:51 ` Robert Dewar
  1 sibling, 0 replies; 8+ messages in thread
From: Larry Kilgallen @ 2000-11-01 15:42 UTC (permalink / raw)


In article <78900ts12pf4fld1rnmm1icng8e8gk9ikv@4ax.com>, Espen Stranger Seland <espenss@stud.ifd.hibu.no> writes:
> How can I read the system and user time?

On VMS you can get "user time" by calling STARLET.GETJPI.

I presume that if you required the answer for some other operating
system, you would have specified it.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: User and system time
  2000-11-01 14:15 User and system time Espen Stranger Seland
  2000-11-01 15:42 ` Larry Kilgallen
@ 2000-11-01 16:51 ` Robert Dewar
  2000-11-02  8:14   ` Espen Stranger Seland
  1 sibling, 1 reply; 8+ messages in thread
From: Robert Dewar @ 2000-11-01 16:51 UTC (permalink / raw)


In article <78900ts12pf4fld1rnmm1icng8e8gk9ikv@4ax.com>,
  Espen Stranger Seland <espenss@stud.ifd.hibu.no> wrote:
> How can I read the system and user time?
> It is to get stats fra tasks.


This is not a language question, but rather an operating
system question, you need to consult your OS documentation
and call the appropriate routines.


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: User and system time
  2000-11-01 16:51 ` Robert Dewar
@ 2000-11-02  8:14   ` Espen Stranger Seland
  2000-11-02 15:50     ` Ted Dennison
  0 siblings, 1 reply; 8+ messages in thread
From: Espen Stranger Seland @ 2000-11-02  8:14 UTC (permalink / raw)


>  Espen Stranger Seland <espenss@stud.ifd.hibu.no> wrote:
>> How can I read the system and user time?
>> It is to get stats fra tasks.
>This is not a language question, but rather an operating
>system question, you need to consult your OS documentation
>and call the appropriate routines.

Ok. In Watcom/QNX there is functions to get these stats from
daughter-processes/threads. Just thought there could be
something like inside ada95.

-espen
--
It's not whether you win or lose,
but how you place the blame. 
http://www.stud.ifd.hibu.no/espenss/



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: User and system time
  2000-11-02  8:14   ` Espen Stranger Seland
@ 2000-11-02 15:50     ` Ted Dennison
  2000-11-02 16:31       ` Ole-Hjalmar Kristensen
  2000-11-02 18:41       ` Espen Stranger Seland
  0 siblings, 2 replies; 8+ messages in thread
From: Ted Dennison @ 2000-11-02 15:50 UTC (permalink / raw)


In article <0h820tgk1aln43cab8u0pcfgvgknqgeblo@4ax.com>,
  Espen Stranger Seland <espenss@stud.ifd.hibu.no> wrote:

(I believe Robert Dewar wrote this part)
> >This is not a language question, but rather an operating
> >system question, you need to consult your OS documentation
> >and call the appropriate routines.

> Ok. In Watcom/QNX there is functions to get these stats from
> daughter-processes/threads. Just thought there could be
> something like inside ada95.

Not quite. QNX (an OS) has calls to get those stats. It has nothing to
do with Watcom except that they perhaps chose to write some bindings (C
header files) to that facility for you. An Ada QNX vendor could do the
exact same thing with Ada specification files. So could any other
language vendor whose language is capable of linking in OS facilites. If
they (Watcom or your QNX Ada vendor) didn't bother, you could even do it
yourself if you could find out what the linkage and parameter profile
are.

"Fine", you say, "But I still want to use this facility in Ada and
you haven't answerd that part of my question." Well, lets try a bit
harder then...

Ada (like C) does not have such a facility natively, probably because it
isn't universally available. (How would I do it on DOS, where there are
no processes or threads?) So if you want to gather that information in
Ada (or in C or in Fortran or in Java or in Cobol or in...) you have to
do the following:

   o  Find out what facility your OS provides for it.
   o  Find out what bindings your compiler provides to that facility.
   o  If the answer to the above is none, see if any third parties
      provide said bindings.
   o  If the answer to the above is still none (or there are cost or
      licensing issues), find the specifications of the OS calls, and
      roll your own bindings.

The only difference with C is that there will almost certianly be at
least one C compiler on any OS that meets the second bullet. But these
days its actually a pretty rare Ada compiler that comes with no OS
bidings either.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: User and system time
  2000-11-02 15:50     ` Ted Dennison
@ 2000-11-02 16:31       ` Ole-Hjalmar Kristensen
  2000-11-02 18:41       ` Espen Stranger Seland
  1 sibling, 0 replies; 8+ messages in thread
From: Ole-Hjalmar Kristensen @ 2000-11-02 16:31 UTC (permalink / raw)


Ted Dennison <dennison@telepath.com> writes:

> In article <0h820tgk1aln43cab8u0pcfgvgknqgeblo@4ax.com>,
>   Espen Stranger Seland <espenss@stud.ifd.hibu.no> wrote:
> 
> (I believe Robert Dewar wrote this part)
> > >This is not a language question, but rather an operating
> > >system question, you need to consult your OS documentation
> > >and call the appropriate routines.
> 
> > Ok. In Watcom/QNX there is functions to get these stats from
> > daughter-processes/threads. Just thought there could be
> > something like inside ada95.
> 
> Not quite. QNX (an OS) has calls to get those stats. It has nothing to
> do with Watcom except that they perhaps chose to write some bindings (C
> header files) to that facility for you. An Ada QNX vendor could do the
> exact same thing with Ada specification files. So could any other
> language vendor whose language is capable of linking in OS facilites. If
> they (Watcom or your QNX Ada vendor) didn't bother, you could even do it
> yourself if you could find out what the linkage and parameter profile
> are.
> 
> "Fine", you say, "But I still want to use this facility in Ada and
> you haven't answerd that part of my question." Well, lets try a bit
> harder then...
> 
> Ada (like C) does not have such a facility natively, probably because it
> isn't universally available. (How would I do it on DOS, where there are
> no processes or threads?) So if you want to gather that information in
> Ada (or in C or in Fortran or in Java or in Cobol or in...) you have to
> do the following:
> 
>    o  Find out what facility your OS provides for it.
>    o  Find out what bindings your compiler provides to that facility.
>    o  If the answer to the above is none, see if any third parties
>       provide said bindings.
>    o  If the answer to the above is still none (or there are cost or
>       licensing issues), find the specifications of the OS calls, and
>       roll your own bindings.
> 
> The only difference with C is that there will almost certianly be at
> least one C compiler on any OS that meets the second bullet. But these
> days its actually a pretty rare Ada compiler that comes with no OS
> bidings either.
> 
> --
> T.E.D.

Not "no OS binding" does not imply a complete OS binding, though.


> 
> http://www.telepath.com/~dennison/Ted/TED.html
> 
> 
> Sent via Deja.com http://www.deja.com/
> Before you buy.

-- 
Kabelsalat ist gesund.

Ole-Hj. Kristensen



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: User and system time
  2000-11-02 15:50     ` Ted Dennison
  2000-11-02 16:31       ` Ole-Hjalmar Kristensen
@ 2000-11-02 18:41       ` Espen Stranger Seland
  2000-11-02 19:12         ` Ted Dennison
  1 sibling, 1 reply; 8+ messages in thread
From: Espen Stranger Seland @ 2000-11-02 18:41 UTC (permalink / raw)


On Thu, 02 Nov 2000 15:50:57 GMT, Ted Dennison <dennison@telepath.com>
wrote:

<Zip>

>The only difference with C is that there will almost certianly be at
>least one C compiler on any OS that meets the second bullet. But these
>days its actually a pretty rare Ada compiler that comes with no OS
>bidings either.

I think I got my answer, thanks.
(The least thing I want to to is to use C++ + ADA95 + CORBA in one
hell of a package, but maybe I just have to ;)

-espen

--
It's not whether you win or lose,
but how you place the blame. 
http://www.stud.ifd.hibu.no/espenss/



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: User and system time
  2000-11-02 18:41       ` Espen Stranger Seland
@ 2000-11-02 19:12         ` Ted Dennison
  0 siblings, 0 replies; 8+ messages in thread
From: Ted Dennison @ 2000-11-02 19:12 UTC (permalink / raw)


In article <g7d30tka5ssuc9np921rvs8o7j8j0kpi4i@4ax.com>,
  Espen Stranger Seland <espenss@stud.ifd.hibu.no> wrote:

> I think I got my answer, thanks.
> (The least thing I want to to is to use C++ + ADA95 + CORBA in one
> hell of a package, but maybe I just have to ;)

I'm not real sure what you are saying here. But there is no reason you'd
have to resort to C++ to use OS calls. As I mentioned before, OS
calls are available to *any* lanaguage that knows how to link to the OS,
including Ada. There is probably already an Ada package on your system
to do the job. But without knowing what your system and compiler are,
there's no way anyone here can tell you exactly what that is.

--
T.E.D.

http://www.telepath.com/~dennison/Ted/TED.html


Sent via Deja.com http://www.deja.com/
Before you buy.



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2000-11-02 19:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-11-01 14:15 User and system time Espen Stranger Seland
2000-11-01 15:42 ` Larry Kilgallen
2000-11-01 16:51 ` Robert Dewar
2000-11-02  8:14   ` Espen Stranger Seland
2000-11-02 15:50     ` Ted Dennison
2000-11-02 16:31       ` Ole-Hjalmar Kristensen
2000-11-02 18:41       ` Espen Stranger Seland
2000-11-02 19:12         ` Ted Dennison

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox