File tree Expand file tree Collapse file tree
standard_tests/mode_switch/successful_mode_switch Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,14 +60,14 @@ func SendSubscription(subscriptions *pb.TriggerSubscriptionRequest) {
6060 sendResponse (BufferToPointerLen (Must (proto .Marshal (execResult ))))
6161}
6262
63- func Now () ( time.Time , error ) {
63+ func Now () time.Time {
6464 var buf [8 ]byte // host writes UnixNano as little-endian uint64
6565 rc := now (unsafe .Pointer (& buf [0 ]))
6666 if rc != ErrnoSuccess {
67- return time. Time {}, fmt .Errorf ("failed to fetch time from host: now() returned errno %d" , rc )
67+ panic ( fmt .Errorf ("failed to fetch time from host: now() returned errno %d" , rc ) )
6868 }
6969 ns := int64 (binary .LittleEndian .Uint64 (buf [:]))
70- return time .Unix (0 , ns ), nil
70+ return time .Unix (0 , ns )
7171}
7272
7373var donCall = int32 (0 )
Original file line number Diff line number Diff line change @@ -50,10 +50,7 @@ func main() {
5050
5151// ignoreTimeCall makes a rawsdk now call and forces the compiler not to optimize it away.
5252func ignoreTimeCall () {
53- t , err := rawsdk .Now ()
54- if err != nil {
55- panic (err )
56- }
53+ t := rawsdk .Now ()
5754 if t .Before (time .Unix (- 1 , 322 )) {
5855 panic ("Test should not run before 1970" )
5956 }
You can’t perform that action at this time.
0 commit comments