inc

suspend fun inc(amount: Double)

Increments the counter by the specified amount. To update the value we must first tranform from raw bits to Double, then add the amount, and finally convert back to raw bits for atomic storage.

Parameters

amount

The value to increment the counter by. Must be non-negative.

Throws


suspend fun inc()

Increments the counter by 1.