blob: 8011393ed896184c89ecec96bc3333f7379266c9 [file] [log] [blame]
Jean-Luc Brouilletc5184e22015-03-13 13:51:24 -07001#
2# Copyright (C) 2015 The Android Open Source Project
3#
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at
7#
8# http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15#
16
17header:
18summary: RenderScript time routines
19description:
20 This file contains RenderScript functions relating to time and date manipulation.
21end:
22
23type: rs_time_t
24size: 32
25simple: int
26summary: Seconds since January 1, 1970
27description:
28 Calendar time interpreted as seconds elapsed since the Epoch (00:00:00 on
29 January 1, 1970, Coordinated Universal Time (UTC)).
30end:
31
32type: rs_time_t
33size: 64
34simple: long
35end:
36
37type: rs_tm
38struct:
39field: int tm_sec, "Seconds after the minute. This ranges from 0 to 59, but possibly up to 60 for leap seconds."
40field: int tm_min, "Minutes after the hour. This ranges from 0 to 59."
41field: int tm_hour, "Hours past midnight. This ranges from 0 to 23."
42field: int tm_mday, "Day of the month. This ranges from 1 to 31."
43field: int tm_mon, "Months since January. This ranges from 0 to 11."
44field: int tm_year, "Years since 1900."
45field: int tm_wday, "Days since Sunday. This ranges from 0 to 6."
46field: int tm_yday, "Days since January 1. This ranges from 0 to 365."
47field: int tm_isdst, "Flag to indicate whether daylight saving time is in effect. The value is positive if it is in effect, zero if it is not, and negative if the information is not available."
48summary: Date and time structure
49description:
50 Data structure for broken-down time components.
51end:
52
53function: rsGetDt
54ret: float, "Time in seconds."
55summary:
56description:
57 Returns the time in seconds since this function was last called in this
58 script.
59test: none
60end:
61
62function: rsLocaltime
63ret: rs_tm*, "Pointer to broken-down time (same as input p local)."
64arg: rs_tm* local, "Broken-down time."
65arg: const rs_time_t* timer, "Input time as calendar time."
66summary:
67description:
68 Converts the time specified by p timer into broken-down time and stores it
69 in p local. This function also returns a pointer to p local. If p local
70 is NULL, this function does nothing and returns NULL.
71test: none
72end:
73
74function: rsTime
75ret: rs_time_t, "Seconds since the Epoch."
76arg: rs_time_t* timer, "Location to also store the returned calendar time."
77summary:
78description:
79 Returns the number of seconds since the Epoch (00:00:00 UTC, January 1,
80 1970). If p timer is non-NULL, the result is also stored in the memory
81 pointed to by this variable. If an error occurs, a value of -1 is returned.
82test: none
83end:
84
85function: rsUptimeMillis
86ret: int64_t, "Uptime in milliseconds."
87summary:
88description:
89 Returns the current system clock (uptime) in milliseconds.
90test: none
91end:
92
93function: rsUptimeNanos
94ret: int64_t, "Uptime in nanoseconds."
95summary:
96description:
97 Returns the current system clock (uptime) in nanoseconds.
98test: none
99end: