How to use two commands at the same time

Hello everyone !!!
I have a problem with my code in my project...
I use a LED and a lcd screen and i want to turn on and off the LED every 100 microseconds AND AT THE SAME TIME to count numbers in lcd screen until 10 every 1000 microseconds
Example:

void _clock()
{
for (int i = 0; i <= 10; i++)
{
lcd.setCursor(0, 1);
lcd.print(i);
delay(1000);
lcd.clear();
}
}

But in loop method first the led goes from on to off and after that ,execute the _clock method in lcd .
But i want to do that 2 things (led and lcd screen message) at THE SAME TIME...
Please i want your help...
Thanks a lot !!!

Take look at Using millis() for timing. A beginners guide, Several things at the same time and look at the BlinkWithoutDelay example in the IDE.

This may be of interest too.

Blocking code discussion:
https://forum.arduino.cc/index.php?topic=526696.0

Stiil doesn't work. I used the BlinkWithoutDelay example but nothing...

My code:

#include <LiquidCrystal.h>
int led = 13;
LiquidCrystal lcd (12, 11, 5, 4, 3, 2);

void setup()
{
pinMode(led, OUTPUT);
lcd.begin(16, 2);
}

void _clock()
{
for (int i = 0; i <= 10; i++)
{
lcd.print(i);
delay(1000);
lcd.clear();
}
}

void loop()
{
_clock();
digitalWrite(ledYellow, 1);
delay(500);
digitalWrite(ledYellow, 1);
delay(500);
}

I know "delay" is not gonna work because stop all loop for a time.
Can anyone send me a similar code or fix mine ??
Thanks again...

arduiNICK:
I use a LED and a lcd screen and i want to turn on and off the LED every 100 microseconds AND AT THE SAME TIME to count numbers in lcd screen until 10 every 1000 microseconds

Do you mean microseconds or milliseconds? The delay statement in your code, delay(1000), is for 1000 milliseconds, or 1,000,000 microseconds.

Sorry... I mean milliseconds

I used the BlinkWithoutDelay example

Not in the code you posted.
Please remember to use code tags when posting code

I used the BlinkWithoutDelay example but nothing...

Please post what you tried and explain the problems that you had.

I use a LED and a lcd screen and i want to turn on and off the LED every 100 milliseconds AND AT THE SAME TIME to count numbers in lcd screen until 10 every 1000 milliseconds.

My code:

#include <LiquidCrystal.h>
int led = 13;
LiquidCrystal lcd (12, 11, 5, 4, 3, 2);

void setup()
{
pinMode(led, OUTPUT);
lcd.begin(16, 2);
}

void _clock()
{
for (int i = 0; i <= 10; i++)
{
lcd.print(i);
delay(1000);
lcd.clear();
}
}

void loop()
{
_clock();
digitalWrite(ledYellow, 1);
delay(100);
digitalWrite(ledYellow, 1);
delay(100);
}

You really should read the links you have been offered.

You can easily implement the LED portion directly from the BlinkWithoutDelay example by simply changing the timing interval.

The LCD portion is just a duplicate of the code for the LED, with a different timing interval, and different code inside the IF statement.

Running two timers simultaneously is not a problem once you understand how BlinkWithoutDelay works.

These lines don't let the yellow LED turn on, off:

digitalWrite(ledYellow, 1);
delay(100);
digitalWrite(ledYellow, 1);
delay(100);

One of them needs to be a 0.

Change the function to something like this. It is called by loop() every time, but only shows an update every 10th pass thru, so the delays in loop() determine how often it updates.

void _clock()
{
i = i +1;
if (i == 10)
{
lcd.print(j);
j = j +1;
if ( j == 10){
j = 0;
}
i == 0;

}
}

Declare i & j before setup() so it is global.

arduiNICK:
My code:

#include <LiquidCrystal.h>
int led = 13;
.........

Please read this:-
How to use this forum
Because your post is breaking the rules about posting code.

Then look at this:-
See my
http://www.thebox.myzen.co.uk/Tutorial/State_Machine.html
Or Robin2's several things at once
http://forum.arduino.cc/index.php?topic=223286.0

Thank all of you and sorry for my mistakes .It was my first time I'm writing here!!!