Skip to content

Instantly share code, notes, and snippets.

@ericsson49
ericsson49 / clock_sync.kt
Created February 24, 2020 22:40
Simulation of simple clock fusion protocol
import kotlin.math.floor
import kotlin.math.max
import kotlin.math.min
import kotlin.math.round
import kotlin.random.Random
const val N = 10000
const val rho = 0.0
const val minD = 0
const val maxD = 1000