Time for an 2014 update…
This commit is contained in:
parent
372c577f83
commit
09687c4926
2520 changed files with 34227 additions and 7318 deletions
8
Task/System-time/C++/system-time-2.cpp
Normal file
8
Task/System-time/C++/system-time-2.cpp
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#include <chrono>
|
||||
#include <ctime> //for conversion std::ctime()
|
||||
#include <iostream>
|
||||
|
||||
int main() {
|
||||
auto timenow = std::chrono::system_clock::to_time_t(std::chrono::system_clock::now());
|
||||
std::cout << std::ctime(&timenow) << std::endl;
|
||||
}
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
t = Time.now
|
||||
|
||||
# textual
|
||||
puts t # => Wed Aug 05 20:14:50 -0400 2009
|
||||
puts t # => 2013-12-27 18:00:23 +0900
|
||||
|
||||
# epoch time
|
||||
puts t.to_i # => 1249517690
|
||||
puts t.to_i # => 1388134823
|
||||
|
||||
# epoch time with fractional seconds
|
||||
puts t.to_f # => 1249517690.74388
|
||||
puts t.to_f # => 1388134823.9801579
|
||||
|
|
|
|||
1
Task/System-time/VBA/system-time.vba
Normal file
1
Task/System-time/VBA/system-time.vba
Normal file
|
|
@ -0,0 +1 @@
|
|||
Debug.Print Now()
|
||||
Loading…
Add table
Add a link
Reference in a new issue