rt_get_time(2)

rt_get_time2

Get the current time

Usage

#define MODULE
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/version.h>
#include <linux/errno.h>
#include <linux/rt_sched.h>

RTIME rt_get_time(void);

Overview

rt_get_time returns the number of real-time clock ticks since system bootup. This is primarily helpful in conjunction with the defined constant RT_TICKS_PER_SECOND for scheduling real-time tasks. For example, a time interval of 100 msecs could be referred to as

RTIME intvl = (RT_TICKS_PER_SECOND / 10);

Then, for example,

rt_task_make_periodic(&mytask, rt_get_time() + 5 * intvl, intvl);

would schedule mytask to run at 100 msec intervals starting 500 msec from the present time.

Return value

The number of clock ticks since system bootup time is returned.

Errors

None.

Releases

Unchanged in 2 releases since Debian 2.2 (Potato).

  1. 2.2–3.0

Author

This manual page was written by Jerry Epplin.

Copyright (C) 1997 Jerry Epplin, placed under the GNU General Public License, see the file copyright for details.

From rtlinux-doc 1.0-2 in Debian 3.0 (Woody). Parsed by carta from the page's man source.