예제 #1
0
def worker(x=0):
    start = Battleship_1_0_0.time.time()
    while True:
        if x % 100 == 0:
            if sys.flags.interactive:
                update_progress(int(x/iterations * 100))
        Battleship_1_0_0._start_game(override=x, display=False)
        return save_time_stamp(start, Battleship_1_0_0.time.time())
예제 #2
0
def save_time_stamp(start, end):
    with open(Battleship_1_0_0.join_(Battleship_1_0_0.path_gamedata_, "battleship_M_time.txt"), "a+") as file:
            file.write("%s\n" % (start - end))