Skip to content

Commit fe36335

Browse files
committed
Remove toNanosPart for now
1 parent 17314b0 commit fe36335

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

core/shared/src/main/scala/org/threeten/bp/Duration.scala

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,21 +1215,6 @@ final class Duration private (private val seconds: Long, private val nanos: Int)
12151215
Math.addExact(result, nanos.toLong)
12161216
}
12171217

1218-
/**
1219-
* Get the nanoseconds part within seconds of the duration.
1220-
*
1221-
* The length of the duration is stored using two fields - seconds and nanoseconds. The
1222-
* nanoseconds part is a value from 0 to 999,999,999 that is an adjustment to the length in
1223-
* seconds. The total duration is defined by calling getNano() and getSeconds().
1224-
*
1225-
* This instance is immutable and unaffected by this method call.
1226-
*
1227-
* @return
1228-
* the nanoseconds within the second part of the length of the duration, from 0 to 999,999,999
1229-
* @since 9
1230-
*/
1231-
def toNanosPart: Int = (nanos / Duration.NANOS_PER_SECOND).toInt
1232-
12331218
/**
12341219
* Compares this duration to the specified {@code Duration}.
12351220
*

tests/shared/src/test/scala/org/threeten/bp/TestDuration.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1938,13 +1938,11 @@ class TestDuration extends AnyFunSuite with AssertionsHelper {
19381938
test("test_toNanos") {
19391939
val test: Duration = Duration.ofSeconds(321, 123456789)
19401940
assertEquals(test.toNanos, 321123456789L)
1941-
assertEquals(test.toNanosPart, 0L)
19421941
}
19431942

19441943
test("test_toNanos_max") {
19451944
val test: Duration = Duration.ofSeconds(0, Long.MaxValue)
19461945
assertEquals(test.toNanos, Long.MaxValue)
1947-
assertEquals(test.toNanosPart, 0L)
19481946
}
19491947

19501948
test("test_toNanos_tooBig") {

0 commit comments

Comments
 (0)