delay function/pwm outputs

hi i want to learn how to make a delay in a program and how to out put a pwm signal. i have used arduino c++ coding before but the commands are a bit different now. any help would be awesome.
when i use that code and compile it, it opens string.h and complains about no #DEVICE before this line....
char *memmove(void *s1,char *s2,size_t n)
{
   char *sc1;
   char *sc2;
   sc1=s1;
   sc2=s2;
   if(sc2<sc1 && sc1 <sc2 +n)
      for(sc1+=n,sc2+=n;0<n;--n)
         *--sc1=*--sc2;
   else
      for(;0<n;--n)
         *sc1++=*sc2++;
  return s1;
  }

/* Standard template: char *strcpy(char *s1, const char *s2)
   copies the string s2 including the null character to s1.
   This is a compiler built in to handle the different address
   spaces */
You should look for your error before this line. Maybe the timer should be a hardware timer?
if you want a delay make a function for it.

void wait(int seconds){
time_t endwait;
endwait = clock() + seconds * CLOCKS_PER_SEC;
while(clock()<endwait)
}
Topic archived. No new replies allowed.