It seems like the browser you are using has JavaScript disabled. As a result, the site will not function properly. We really want you to enable it so you may experience our site as we intended it. If you have no idea what we are talking about or if you need help, visit http://www.enable-javascript.com×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

Oops, it seems like you're using an old browser that we do not fully support. If you're able to, please upgrade your browser here.×
This website uses cookies. By continuing to browse this site you are agreeing to our use of cookies. Find out more on our cookie page.×

clock_getres()

Synopsis:

Since:

Arguments:

clock_id

The ID of the clock whose resolution you want to get; one of:

CLOCK_REALTIME — the standard POSIX-defined clock.
Timers based on this clock wake up the processor if it's in a power-saving
mode.

CLOCK_SOFTTIME — this clock is active only when
the processor isn't in a power-saving mode.
For example, an application using a CLOCK_SOFTTIME timer
to sleep wouldn't wake up
the processor when the application was due to wake up.
This will allow the processor to enter a power-saving mode.

While the processor isn't in a power-saving mode,
CLOCK_SOFTTIME behaves the same as
CLOCK_REALTIME.

CLOCK_MONOTONIC — this clock always increases
at a constant rate and can't be adjusted.

res

A pointer to a
timespec
structure in which clock_getres() can store the resolution.
The function sets the tv_sec member to 0, and the
tv_nsec member to be the resolution of the clock, in nanoseconds.

Library:

libc

Use the -l c option to
qcc
to link against this library.
This library is usually included automatically.

Description:

The clock_getres() function gets the resolution of the clock
specified by clock_id and puts it into the buffer pointed to by
res.

1. Choose your focus

This is the focus controller. Use this controller to choose your primary development approach (Cascades or Core).

By selecting a focus, you get to decide what content should be front and center on the site.

2. Download the tools

Before you start developing, you'll need to visit the Downloads tab. Here you'll find downloads for the BlackBerry 10 Native SDK, BlackBerry 10 Device Simulator, and some other useful tools.

3. Try the sample apps

Now featuring a filter control, the Sample apps tab allows you to search for samples by name or by feature.

Select either the Core or Cascades check boxes to display the samples relevant to your focus.

4. Educate yourself

The Documentation tab contains tons of examples, tutorials, and best practices to guide you along the path towards building an awesome app.

The documentation for your preferred focus always appears at the top of the left-hand navigation, but you can still access the rest of the documentation at the bottom.

5. Start developing

The Reference tab is where you'll find essential details about how to use our APIs.

You can use the left-hand navigation to choose how you would like to browse the reference: by module, by topic, or alphabetically. If you have an idea of what you are looking for, start typing it in the Filter box.