Signed fractions of a second at nanosecond resolution of the span
of time. Durations less than one second are represented with a 0secondsfield and a positive or negativenanosfield. For durations
of one second or more, a non-zero value for thenanosfield must be
of the same sign as thesecondsfield. Must be from -999,999,999
to +999,999,999 inclusive.
Signed seconds of the span of time. Must be from -315,576,000,000
to +315,576,000,000 inclusive. Note: these bounds are computed from:
60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Interface DurationOrBuilder (3.19.4)\n\n public interface DurationOrBuilder extends MessageLiteOrBuilder\n\nImplements\n----------\n\n[MessageLiteOrBuilder](/java/docs/reference/protobuf/latest/com.google.protobuf.MessageLiteOrBuilder)\n\nMethods\n-------\n\n### getNanos()\n\n public abstract int getNanos()\n\nSigned fractions of a second at nanosecond resolution of the span\nof time. Durations less than one second are represented with a 0\n`seconds` field and a positive or negative `nanos` field. For durations\nof one second or more, a non-zero value for the `nanos` field must be\nof the same sign as the `seconds` field. Must be from -999,999,999\nto +999,999,999 inclusive.\n\n`int32 nanos = 2;`\n\n### getSeconds()\n\n public abstract long getSeconds()\n\nSigned seconds of the span of time. Must be from -315,576,000,000\nto +315,576,000,000 inclusive. Note: these bounds are computed from:\n60 sec/min \\* 60 min/hr \\* 24 hr/day \\* 365.25 days/year \\* 10000 years\n\n`int64 seconds = 1;`"]]