rick ngjh

rick ngjh

  • NA
  • 1
  • 1.7k

conversion of interval from miliseconds to seconds in window service

Aug 5 2010 4:51 AM

This is my code here..
i am reading the capture interval from a txt file .. which is in second .. for example is 60 sec
however when the file read my txt file ... 60 sec have become 60 millisecond .. this become my camera interval become faster... how cn i change the 60 sec to 60000 millisecond ... pls help thanks alot
 

string[] f = File.ReadAllLines("C:\\Users\\crazy-stupid-boy\\Desktop\\zoe project\\PATS_084623Q\\PATS_084623Q\\bin\\Debug\\Config.txt");
string str = f[5];

File.WriteAllText("C:\\Users\\crazy-stupid-boy\\Desktop\\zoe project\\PATS_084623Q\\PATS_084623Q\\bin\\Debug\\ConfigText.txt",str);
//double capintcomboBox = Convert.ToString(RetrieveValueFromConfig("Capture Intervals"));
//string str = Convert.ToDouble();
double.Parse(str);
Convert.ToDouble(str);
timer = new System.Timers.Timer();
timer.Interval = str * 1000;
timer.AutoReset = true;
timer.Elapsed += new ElapsedEventHandler(timer1_Elasped);
//timer.Interval = str.ToString;
timer.Enabled = true;
timer.Start();