Current File : //usr/share/man/man9f/ddi_get_lbolt.9f
'\" te
.\" Copyright (c) 2009, Sun Microsystems, Inc.  All Rights Reserved
.TH ddi_get_lbolt 9F "4 Sep 2009" "SunOS 5.11" "Kernel Functions for Drivers"
.SH NAME
ddi_get_lbolt, ddi_get_lbolt64 \- return the number of clock ticks since boot
.SH SYNOPSIS
.LP
.nf
#include <sys/types.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>

\fBclock_t\fR \fBddi_get_lbolt\fR(\fBvoid\fR);
.fi

.LP
.nf
\fBint64_t\fR \fBddi_get_lbolt64\fR(\fBvoid\fR);
.fi

.SH INTERFACE LEVEL
.sp
.LP
Solaris DDI specific (Solaris DDI).
.SH DESCRIPTION
.sp
.LP
The \fBddi_get_lbolt()\fR function returns a value that represents the number of clock ticks since the system booted. This value is used as a counter or timer inside the system kernel. The tick frequency can be determined by using \fBdrv_usectohz\fR(9F), which converts microseconds into clock ticks.
.sp
.LP
The \fBddi_get_lbolt64()\fR behaves essentially the same as \fBddi_get_lbolt()\fR, except the value is returned in a longer data type (\fBint64_t\fR) that will not wrap for 2.9 billion years.
.SH RETURN VALUES
.sp
.LP
The \fBddi_get_lbolt()\fR function returns the number of clock ticks since boot in a \fBclock_t\fR type.
.sp
.LP
The \fBddi_get_lbolt64()\fR function returns the number of clock ticks since boot in a \fBint64_t\fR type.
.SH CONTEXT
.sp
.LP
These routines can be called from any context.
.SH SEE ALSO
.sp
.LP
\fBddi_get_time\fR(9F), \fBdrv_getparm\fR(9F), \fBdrv_usectohz\fR(9F)
.sp
.LP
\fIWriting Device Drivers for Oracle Solaris 11.2\fR
.sp
.LP
\fISTREAMS Programming Guide\fR