andrewroth-btce 0.1.9.3 → 0.1.9.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/btce.rb +8 -4
- metadata +1 -1
data/lib/btce.rb
CHANGED
@@ -283,10 +283,14 @@ module Btce
|
|
283
283
|
end
|
284
284
|
|
285
285
|
def nonce
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
286
|
+
File.open("btce-nonce", "a+") do |f|
|
287
|
+
f.flock(File::LOCK_EX)
|
288
|
+
@nonce = f.read.to_i
|
289
|
+
@nonce += 1
|
290
|
+
f.truncate(0)
|
291
|
+
f.puts(@nonce)
|
292
|
+
end
|
293
|
+
return Time::now.to_i + @nonce
|
290
294
|
end
|
291
295
|
private :nonce
|
292
296
|
|