Commit efda263e authored by Mart Lubbers's avatar Mart Lubbers

Add equality for timespec

parent ed359f63
Pipeline #9141 passed with stage
in 1 minute and 45 seconds
......@@ -98,3 +98,4 @@ instance < Timespec
instance + Timespec
instance - Timespec
instance zero Timespec
instance == Timespec
implementation module System.Time
import StdString, StdArray, StdClass, StdOverloaded, StdInt, StdMisc
import StdString, StdArray, StdClass, StdOverloaded, StdInt, StdMisc, StdBool
import System.OS
import System._Pointer, System._Posix
import Text
......@@ -207,3 +207,7 @@ where
instance zero Timespec
where zero = {tv_sec=0, tv_nsec=0}
instance == Timespec
where
(==) t1 t2 = t1.tv_sec == t2.tv_sec && t1.tv_nsec == t2.tv_nsec
......@@ -103,3 +103,4 @@ instance < Timespec
instance + Timespec
instance - Timespec
instance zero Timespec
instance == Timespec
implementation module System.Time
import StdString, StdArray, StdClass, StdOverloaded, StdInt, StdMisc
import StdString, StdArray, StdClass, StdOverloaded, StdInt, StdMisc, StdBool
import System._Pointer
import System._WinBase
import Data.Integer
......@@ -210,3 +210,7 @@ where
instance zero Timespec
where zero = {tv_sec=0, tv_nsec=0}
instance == Timespec
where
(==) t1 t2 = t1.tv_sec == t2.tv_sec && t1.tv_nsec == t2.tv_nsec
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment