示例#1
0
        static void Main(string[] args)
        {
            ServiceThreadImpl t = new ServiceThreadImpl();

            double speed;
            speed = WebUtil.DownloadSpeed(false);
            Console.WriteLine("Download speed detected: " + speed.ToString("0.#") + "kbps");

            t.runUploadTrafficSensor(1024, out speed);
            Console.WriteLine("Upload speed detected: " + speed.ToString("0.#") + "kbps");

            Console.ReadLine();
        }
示例#2
0
        private void runThread()
        {
            ServiceThreadImpl serviceTimpl = new ServiceThreadImpl();
            Thread serviceThread = new Thread(new ThreadStart(serviceTimpl.runHeartBeat));
            serviceThread.Start();

            if (Constants.STATIC_RUN_COUNTER > 0)
            {
                CheckServiceThreadImpl checkServiceTimpl = new CheckServiceThreadImpl("open-audit-check-service");
                Thread checkServiceThread = new Thread(new ThreadStart(checkServiceTimpl.run));
                checkServiceThread.Start();
            }
        }
示例#3
0
 private void button1_Click_2(object sender, EventArgs e)
 {
     ServiceThreadImpl sti = new ServiceThreadImpl();
     sti.runUploadTrafficSensor();
     sti.runDownloadTrafficSensor();
 }