public static void SaveLoad_Test(PocketRoot root) { Stopwatch stopwatch; root.Process(i => (number)Math.Cos(i)); var hash_saved = root.Hash(Node.VarS); stopwatch = Stopwatch.StartNew(); var file = root.FullSave(); stopwatch.Stop(); Tools.LogPrint("Save done! Time = {0}", stopwatch.Elapsed.TotalSeconds); root.Process(i => 0); var hash_cleared = root.Hash(Node.VarS); stopwatch = Stopwatch.StartNew(); root.FullLoad(file); var hash_loaded = root.Hash(Node.VarS); stopwatch.Stop(); Tools.LogPrint("Load done! Time = {0}", stopwatch.Elapsed.TotalSeconds); Tools.LogPrint("Hash comparison {0} vs {1}. (Sanity check : {2})", hash_saved, hash_loaded, hash_cleared); }