Class: Bitbot::Trader::Utils::NonceGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/bitbot/trader/utils/nonce_generator.rb

Overview

Generates a nonce

Some http requests use it to prevent double http requests

Class Method Summary collapse

Class Method Details

.generate(time_class = Time) ⇒ Fixnum

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Generates a nonce from current time

Returns:

  • (Fixnum)

    nonce



15
16
17
# File 'lib/bitbot/trader/utils/nonce_generator.rb', line 15

def self.generate(time_class = Time)
  time_class.now.to_i
end