Beispiel #1
0
        private static void Create_Objects_Method_Multithread(int i)
        {
            DateTime A = DateTime.Now;

            for (int j = 0; j < Numbers; j++)
            {
                Data1 AS = new Data1(Rand.Next());
            }

            DateTime B = DateTime.Now;

            TimeSpan C = B - A;

            Console.WriteLine("\tTest Thread ID: {0}.\t Time: {1} ms.", Thread.CurrentThread.ManagedThreadId, C.TotalMilliseconds);
        }
Beispiel #2
0
        //TODO: Fix problem with nr test in multithread version tests
        /// <summary>
        /// Method Creating New Objects
        /// </summary>
        /// <param name="i">Test nr</param>
        private static void Create_Objects_Method(int i)
        {
            DateTime A = DateTime.Now;

            for (int j = 0; j < Numbers; j++)
            {
                Data1 AS = new Data1(Rand.Next());
            }

            DateTime B = DateTime.Now;

            TimeSpan C = B - A;

            Console.WriteLine("\tTest nr: {0}.\t Time: {1} ms.", i, C.TotalMilliseconds);
        }