creating an authentication console application using GetTickCount function
<p>I'm trying to make a simple login/authentication console application, for example I have a string testpwd as my password and I want to the program to count the time in milliseconds the moment the user starts entering the password and it should output how many seconds each user takes to type the password every time I a user starts type from the keyboard with the help of the <code>GetTickCount</code> function. </p>

<p>I am not sure how I can go about it but the only thing I have managed to do is this code below:</p>

<pre><code>using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace LoginSystem
{
    class LSystem
    {
        static void Main(string[] args)
        {
            Console.WriteLine("Hello! This is simple login system!");
            Console.Write("Write your username here: ");
            string strUsername = Console.ReadLine();
            string strTUsername = "testuser";
            if (strUsername == strTUsername)
            {
                Console.Write("Write your password here: ");
                Console.ForegroundColor = ConsoleColor.Black;
                string strPassword = Console.ReadLine();
                string strTPassword = "testpwd";
                if (strPassword == strTPassword)
                {
                    Console.ForegroundColor = ConsoleColor.Gray;
                    Console.WriteLine("You are logged in!");
                    Console.ReadLine();

                }
                else
                {
                    Console.ForegroundColor = ConsoleColor.Gray;
                    Console.WriteLine("Bad password for user: {0}", strUsername);
                    Console.ReadLine();
                }
            }
            else
            {
                Console.WriteLine("Bad username!");
                Console.ReadLine();
            }
        }
    }
}
</code></pre>
