Altera_Forum
Honored Contributor
19 years agocyg_thread_delay
Hi, I am new to eCos.
Currently I am using CycloneII chip with 40Mhz clock. I would like to delay for 1 second. I read eCos documents. And I found that I'm supposed to use below method. cyg_thread_delay(DELAY); But I'm not sure what value do I have to put in 'DELAY'. A clock that runs at 40MHz. In order to delay 1 second, which is 1000 millisecond, how to work out the number of clock ticks? I got confussed while I am reading the documents. Could you help me out, here? (I was doing experiments by putting random in DELAY, and it seems that cyg_thread_delay(1000); seems to be 1 second approximately. But I would like to know how to calculate it.) Thanks in advance.