Home
last modified time | relevance | path

Searched refs:nanosToAdd (Results 1 – 2 of 2) sorted by relevance

/external/opencensus-java/api/src/main/java/io/opencensus/common/
DTimestamp.java118 public Timestamp addNanos(long nanosToAdd) { in addNanos() argument
119 return plus(0, nanosToAdd); in addNanos()
172 private Timestamp plus(long secondsToAdd, long nanosToAdd) { in plus() argument
173 if ((secondsToAdd | nanosToAdd) == 0) { in plus()
177 epochSec = TimeUtils.checkedAdd(epochSec, nanosToAdd / NANOS_PER_SECOND); in plus()
178 nanosToAdd = nanosToAdd % NANOS_PER_SECOND; in plus()
179 long nanoAdjustment = getNanos() + nanosToAdd; // safe int + NANOS_PER_SECOND in plus()
/external/protobuf/csharp/src/Google.Protobuf/
DJsonParser.cs806 int nanosToAdd = 0; in MergeTimestamp()
811 nanosToAdd = parsedFraction * SubsecondScalingFactors[subseconds.Length]; in MergeTimestamp()
834 if (secondsToAdd < 0 && nanosToAdd > 0) in MergeTimestamp()
837 nanosToAdd = nanosToAdd - Duration.NanosecondsPerSecond; in MergeTimestamp()
839 if (secondsToAdd != 0 || nanosToAdd != 0) in MergeTimestamp()
841 timestamp += new Duration { Nanos = nanosToAdd, Seconds = secondsToAdd }; in MergeTimestamp()