Skip to content

Rollup of 17 pull requests #64452

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 49 commits into from
Closed
Changes from 5 commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
33788c2
Added table containing the system calls used by Instant and SystemTime.
Aug 24, 2019
1478ef4
Update src/libstd/time.rs
DevQps Aug 26, 2019
ff63bf8
Fix minor typo in docs.
goddessfreya Sep 3, 2019
7589d3a
Update other doc.
goddessfreya Sep 3, 2019
36b37e2
Remove two unnecessary `clone()` calls.
nnethercote Sep 8, 2019
c1b9a46
Add some assertions on obligation type sizes.
nnethercote Sep 9, 2019
b972ac8
Shrink `ObligationCauseCode` by boxing `MatchExpressionArm`.
nnethercote Sep 6, 2019
2e3b079
Shrink `ObligationCauseCode` by boxing `IfExpression`.
nnethercote Sep 9, 2019
3dd0e2b
Added some context on SGX. Lists Darwin separately.
Sep 9, 2019
5287885
use randSecure and randABytes
bpangWR Sep 10, 2019
83e7976
Merge pull request #20 from Wind-River/rand
BaoshanPang Sep 11, 2019
5e8bf87
Merge pull request #21 from rust-lang/master
BaoshanPang Sep 11, 2019
b731e11
declare EnvKey before use to fix build error
bpangWR Sep 11, 2019
a8c5f90
Fix inconsistent link formatting.
tomasz-rozanski Sep 11, 2019
223600a
Guarantee vec.clear/truncate is O(1) for trivial types
kornelski Sep 11, 2019
2fcd870
Box `DiagnosticBuilder`.
nnethercote Sep 11, 2019
08fa803
Merge pull request #22 from Wind-River/master_002
BaoshanPang Sep 12, 2019
612c394
Trim rustc-workspace-hack
mati865 Sep 11, 2019
e9214a1
codegen: be more explicit about setting giving names to allocas.
eddyb Sep 12, 2019
6dc1483
Provide a span if main function is not present in crate
Mark-Simulacrum Sep 8, 2019
a2261ad
Inline `mark_neighbours_as_waiting_from`.
nnethercote Sep 13, 2019
a47a5c3
typo fix
Sep 9, 2019
bd25507
Remove raw string literal quotes from error index descriptions
ollie27 Sep 13, 2019
69112a2
Add self to .mailmap
ollie27 Sep 13, 2019
b3b6713
Update src/libstd/time.rs
DevQps Sep 13, 2019
7437f77
Make fn ptr always structural match, regardless of whether formal typ…
pnkfelix Sep 13, 2019
c529294
Regression tests for fn ptr and `#[structural_match]` as discussed in…
pnkfelix Sep 13, 2019
bdad2c5
codegen: use "_N" (like for other locals) instead of "argN", for argu…
eddyb Sep 13, 2019
57e8287
fix #64430
12101111 Sep 13, 2019
b98a844
add ui test for #64430
12101111 Sep 13, 2019
e484f21
add trailing newline
12101111 Sep 13, 2019
094af97
Update value.rs
goddessfreya Sep 14, 2019
c69a9f0
Rollup merge of #63846 - DevQps:32626-document-time-system-calls, r=r…
Centril Sep 14, 2019
47af328
Rollup merge of #64116 - ZeGentzy:patch-1, r=oli-obk
Centril Sep 14, 2019
2834212
Rollup merge of #64290 - Mark-Simulacrum:span-no-main, r=estebank
Centril Sep 14, 2019
07d9cd2
Rollup merge of #64302 - nnethercote:shrink-ObligationCauseCode, r=za…
Centril Sep 14, 2019
0b74b2d
Rollup merge of #64372 - Wind-River:master, r=alexcrichton
Centril Sep 14, 2019
c9faf1f
Rollup merge of #64374 - nnethercote:box-DiagnosticBuilder, r=zackmdavis
Centril Sep 14, 2019
1ef6f1e
Rollup merge of #64375 - kornelski:vecdrop, r=rkruppe
Centril Sep 14, 2019
9883cc5
Rollup merge of #64378 - Rosto75:master, r=jonas-schievink
Centril Sep 14, 2019
4bfa11f
Rollup merge of #64384 - mati865:tools_hack, r=alexcrichton
Centril Sep 14, 2019
63e0887
Rollup merge of #64393 - Wind-River:master_002_envKey, r=alexcrichton
Centril Sep 14, 2019
fd7a7b9
Rollup merge of #64420 - nnethercote:inline-mark_neighbours_as_waitin…
Centril Sep 14, 2019
5747851
Rollup merge of #64422 - ollie27:error_index_generator_stringify, r=M…
Centril Sep 14, 2019
88ea39e
Rollup merge of #64423 - ollie27:mailmap, r=Mark-Simulacrum
Centril Sep 14, 2019
6eab5e7
Rollup merge of #64425 - guanqun:typo-fix, r=matthewjasper
Centril Sep 14, 2019
a51ebc1
Rollup merge of #64431 - pnkfelix:issue-63479-fnptr-is-structural-mat…
Centril Sep 14, 2019
eae08ef
Rollup merge of #64435 - eddyb:arguments-against-arg, r=rkruppe
Centril Sep 14, 2019
a5826ab
Rollup merge of #64439 - 12101111:fix-owned-box, r=Centril
Centril Sep 14, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions src/libstd/time.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,30 @@ pub use core::time::Duration;
/// println!("{}", now.elapsed().as_secs());
/// }
/// ```
///
/// # Underlying System calls
/// Currently, the following system calls are being used to get the current time using `now()`:
///
/// | Platform | System call |
/// |:---------:|:--------------------------------------------------------------------:|
/// | Cloud ABI | [clock_time_get (Monotonic Clock)] |
/// | SGX | [`insecure_time` usercall]. More information on [timekeeping in SGX] |
/// | UNIX | [clock_time_get (Monotonic Clock)] |
/// | Darwin | [mach_absolute_time] |
/// | VXWorks | [clock_gettime (Monotonic Clock)] |
/// | WASI | [__wasi_clock_time_get (Monotonic Clock)] |
/// | Windows | [QueryPerformanceCounter] |
///
/// [QueryPerformanceCounter]: https://docs.microsoft.com/en-us/windows/win32/api/profileapi/nf-profileapi-queryperformancecounter
/// [`insecure_time` usercall]: https://edp.fortanix.com/docs/api/fortanix_sgx_abi/struct.Usercalls.html#method.insecure_time
/// [timekeeping in SGX]: https://edp.fortanix.com/docs/concepts/rust-std/#codestdtimecode
/// [__wasi_clock_time_get (Monotonic Clock)]: https://github.com/CraneStation/wasmtime/blob/master/docs/WASI-api.md#clock_time_get
/// [clock_gettime (Monotonic Clock)]: https://linux.die.net/man/3/clock_gettime
/// [mach_absolute_time]: https://developer.apple.com/library/archive/documentation/Darwin/Conceptual/KernelProgramming/services/services.html
/// [clock_time_get (Monotonic Clock)]: https://github.com/NuxiNL/cloudabi/blob/master/cloudabi.txt
///
/// **Disclaimer:** These system calls might change over time.
///
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[stable(feature = "time2", since = "1.8.0")]
pub struct Instant(time::Instant);
Expand Down Expand Up @@ -114,6 +138,28 @@ pub struct Instant(time::Instant);
/// }
/// }
/// ```
///
/// # Underlying System calls
/// Currently, the following system calls are being used to get the current time using `now()`:
///
/// | Platform | System call |
/// |:---------:|:--------------------------------------------------------------------:|
/// | Cloud ABI | [clock_time_get (Realtime Clock)] |
/// | SGX | [`insecure_time` usercall]. More information on [timekeeping in SGX] |
/// | UNIX | [clock_gettime (Realtime Clock)] |
/// | DARWIN | [gettimeofday] |
/// | VXWorks | [clock_gettime (Realtime Clock)] |
/// | WASI | [__wasi_clock_time_get (Realtime Clock)] |
/// | Windows | [GetSystemTimeAsFileTime] |
///
/// [clock_time_get (Realtime Clock)]: https://github.com/NuxiNL/cloudabi/blob/master/cloudabi.txt
/// [gettimeofday]: http://man7.org/linux/man-pages/man2/gettimeofday.2.html
/// [clock_gettime (Realtime Clock)]: https://linux.die.net/man/3/clock_gettime
/// [__wasi_clock_time_get (Realtime Clock)]: https://github.com/CraneStation/wasmtime/blob/master/docs/WASI-api.md#clock_time_get
/// [GetSystemTimeAsFileTime]: https://docs.microsoft.com/en-us/windows/win32/api/sysinfoapi/nf-sysinfoapi-getsystemtimeasfiletime
///
/// **Disclaimer:** These system calls might change over time.
///
#[derive(Copy, Clone, PartialEq, Eq, PartialOrd, Ord, Hash)]
#[stable(feature = "time2", since = "1.8.0")]
pub struct SystemTime(time::SystemTime);
Expand Down