mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "gis88530" <gis88530@cis.nctu.edu.tw>
To: <linux-kernel@vger.kernel.org>
Subject: measurement
Date: Sat, 17 Mar 2001 14:34:27 +0800	[thread overview]
Message-ID: <003301c0aeac$517b31d0$ae58718c@cis.nctu.edu.tw> (raw)

Hello,

I use PSCHED_GET_TIME(stamp) to measure the
delay of some kernel function.

function_name( ) {
int psched_clock_scale;
psched_time_t stamp1, stamp2;
psched_tdiff_t delay;

PSCHED_GET_TIME(stamp1);
PSCHED_GET_TIME(stamp2);
delay=PSCHED_TDIFF(stamp2, stamp1);
printk(KERN_INFO "[%ld], [%ld], [%ld]\n", stamp1, stamp2, delay);
}

But the result like this [135967], [0], [135967].
I really don't know why stamp2 is 0, and
I can't find out the scale of stamp1/stamp2.
(micro-second ?? )

Thanks.
Cheers,
Steven



                 reply	other threads:[~2001-03-17  6:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='003301c0aeac$517b31d0$ae58718c@cis.nctu.edu.tw' \
    --to=gis88530@cis.nctu.edu.tw \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®