INNER CODE UNIT · Java

println

qtds35k/HighFrequencyTradingBot · src/trading/HttpHelper.java:407

	private static void println(String msg, Object... args) {
		System.out.println(String.format(msg, args));
	}
	private static void print(String msg, Object... args) {
		System.out.print(String.format(msg, args));
	}
	
	// sleeps for some time that is centered at input argument with randomized decimal amplitude
	private static void randomSleep(int sec) throws InterruptedException {
		int random_sec = (int) (sec * 1000 + Math.random() * 300 - 150);
		// let's make it 0.5 sec shorter
		if (random_sec > 500) random_sec -= 500;
		Thread.sleep(random_sec);
	}
}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…