Using two outputs

this is my code that I need two outputs for, I'm not sure how fast it should be if I am operating at 40k Hz

if (OCR2A<0)
{
  // write to pin 10;
}
else if(OCR2A>0)
{
 // write to pin 11;
}