Duration
Duration: { decode: any; encode: any; fromJSON: any; fromPartial: any; toJSON: any }
Type declaration
-
decode: function
- decode(input: Uint8Array | Reader, length?: number): Duration
-
Parameters
-
input: Uint8Array | Reader
-
Optional length: number
-
encode: function
- encode(message: Duration, writer?: Writer): Writer
-
Parameters
Returns Writer
-
fromJSON: function
-
fromPartial: function
- fromPartial(object: { nanos?: number; seconds?: number }): Duration
-
Parameters
-
object: { nanos?: number; seconds?: number }
-
Optional nanos?: number
-
Optional seconds?: number
-
toJSON: function
-
Parameters
Returns unknown
Signed fractions of a second at nanosecond resolution of the span of time. Durations less than one second are represented with a 0
seconds
field and a positive or negativenanos
field. For durations of one second or more, a non-zero value for thenanos
field must be of the same sign as theseconds
field. Must be from -999,999,999 to +999,999,999 inclusive.