File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
js/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core
jvm/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core
native/src/main/scala/com/github/plokhotnyuk/jsoniter_scala/core Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -2952,7 +2952,8 @@ final class JsonReader private[jsoniter_scala](
2952
2952
b = nextByte(head)
2953
2953
} else if (state == 3 ) tokenError('"' )
2954
2954
}
2955
- Duration .ofSeconds(seconds, nano.toLong)
2955
+ if (nano == 0 ) Duration .ofSeconds(seconds)
2956
+ else Duration .ofSeconds(seconds, nano.toLong)
2956
2957
}
2957
2958
2958
2959
private [this ] def sumSeconds (s1 : Long , s2 : Long , pos : Int ): Long = {
Original file line number Diff line number Diff line change @@ -2999,7 +2999,8 @@ final class JsonReader private[jsoniter_scala](
2999
2999
b = nextByte(head)
3000
3000
} else if (state == 3 ) tokenError('"' )
3001
3001
}
3002
- Duration .ofSeconds(seconds, nano.toLong)
3002
+ if (nano == 0 ) Duration .ofSeconds(seconds)
3003
+ else Duration .ofSeconds(seconds, nano.toLong)
3003
3004
}
3004
3005
3005
3006
private [this ] def sumSeconds (s1 : Long , s2 : Long , pos : Int ): Long = {
Original file line number Diff line number Diff line change @@ -2995,7 +2995,8 @@ final class JsonReader private[jsoniter_scala](
2995
2995
b = nextByte(head)
2996
2996
} else if (state == 3 ) tokenError('"' )
2997
2997
}
2998
- Duration .ofSeconds(seconds, nano.toLong)
2998
+ if (nano == 0 ) Duration .ofSeconds(seconds)
2999
+ else Duration .ofSeconds(seconds, nano.toLong)
2999
3000
}
3000
3001
3001
3002
private [this ] def sumSeconds (s1 : Long , s2 : Long , pos : Int ): Long = {
You can’t perform that action at this time.
0 commit comments