1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
| import com.fasterxml.jackson.annotation.ObjectIdGenerators
| import org.junit.Test
| import java.time.Duration
| import java.util.*
|
| class Test {
|
| @Test
| fun foo1() {
| val p = Pair(1, 2)
| val uuid = UUID.randomUUID().toString()
| println(uuid)
| }
|
| @Test
| fun foo2() {
| val t1 = Date(2023, 10, 20, 10, 0, 0)
| val t2 = Date(2023, 10, 20, 10, 30, 0)
| val d = Duration.between(t1.toInstant(), t2.toInstant()).toHours()
| println(d)
| }
| }
|
|