-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fe0ebbc
commit 930914d
Showing
14 changed files
with
171 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
[clocks] | ||
url = "https://github.com/WebAssembly/wasi-clocks/archive/main.tar.gz" | ||
sha256 = "468b4d12892fe926b8eb5d398dbf579d566c93231fa44f415440572c695b7613" | ||
sha512 = "e6b53a07221f1413953c9797c68f08b815fdaebf66419bbc1ea3e8b7dece73731062693634731f311a03957b268cf9cc509c518bd15e513c318aa04a8459b93a" | ||
sha256 = "ea9d69ee803bc176e23e5268f5e24a2ac485dd1f62a0ab4c748e9d3f901f576f" | ||
sha512 = "5efc22927c46cd56c41e5549ec775561c7fac2ea0d365abc0b55396d9475a7c9f984077a81f84a44a726f1c008fd2fadbffffa4fa53ecd5fbfd05afd379ab428" | ||
|
||
[io] | ||
url = "https://github.com/WebAssembly/wasi-io/archive/main.tar.gz" | ||
sha256 = "7210e5653539a15478f894d4da24cc69d61924cbcba21d2804d69314a88e5a4c" | ||
sha512 = "49184a1b0945a889abd52d25271172ed3dc2db6968fcdddb1bab7ee0081f4a3eeee0977ad2291126a37631c0d86eeea75d822fa8af224c422134500bf9f0f2bb" | ||
sha256 = "2a74bd811adc46b5a0f19827ddbde89870e52b17615f4d0873f06fd977250caf" | ||
sha512 = "94624f00c66e66203592cee820f80b1ba91ecdb71f682c154f25eaf71f8d8954197dcb64503bc21e72ed5e812af7eae876df47b7eb727b02db3a74a7ce0aefca" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
package wasi:clocks@0.2.1; | ||
|
||
@unstable(feature = clocks-timezone) | ||
interface timezone { | ||
@unstable(feature = clocks-timezone) | ||
use wall-clock.{datetime}; | ||
|
||
/// Return information needed to display the given `datetime`. This includes | ||
/// the UTC offset, the time zone name, and a flag indicating whether | ||
/// daylight saving time is active. | ||
/// | ||
/// If the timezone cannot be determined for the given `datetime`, return a | ||
/// `timezone-display` for `UTC` with a `utc-offset` of 0 and no daylight | ||
/// saving time. | ||
@unstable(feature = clocks-timezone) | ||
display: func(when: datetime) -> timezone-display; | ||
|
||
/// The same as `display`, but only return the UTC offset. | ||
@unstable(feature = clocks-timezone) | ||
utc-offset: func(when: datetime) -> s32; | ||
|
||
/// Information useful for displaying the timezone of a specific `datetime`. | ||
/// | ||
/// This information may vary within a single `timezone` to reflect daylight | ||
/// saving time adjustments. | ||
@unstable(feature = clocks-timezone) | ||
record timezone-display { | ||
/// The number of seconds difference between UTC time and the local | ||
/// time of the timezone. | ||
/// | ||
/// The returned value will always be less than 86400 which is the | ||
/// number of seconds in a day (24*60*60). | ||
/// | ||
/// In implementations that do not expose an actual time zone, this | ||
/// should return 0. | ||
utc-offset: s32, | ||
|
||
/// The abbreviated name of the timezone to display to a user. The name | ||
/// `UTC` indicates Coordinated Universal Time. Otherwise, this should | ||
/// reference local standards for the name of the time zone. | ||
/// | ||
/// In implementations that do not expose an actual time zone, this | ||
/// should be the string `UTC`. | ||
/// | ||
/// In time zones that do not have an applicable name, a formatted | ||
/// representation of the UTC offset may be returned, such as `-04:00`. | ||
name: string, | ||
|
||
/// Whether daylight saving time is active. | ||
/// | ||
/// In implementations that do not expose an actual time zone, this | ||
/// should return false. | ||
in-daylight-saving-time: bool, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,11 @@ | ||
package wasi:clocks@0.2.0; | ||
package wasi:clocks@0.2.1; | ||
|
||
@since(version = 0.2.0) | ||
world imports { | ||
@since(version = 0.2.0) | ||
import monotonic-clock; | ||
@since(version = 0.2.0) | ||
import wall-clock; | ||
@unstable(feature = clocks-timezone) | ||
import timezone; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.