On delay timer

I am using 2 inputs say a & b. I want to start on delay timer on input a & if want to stop timer before its
stipulated time if input b is true. I am using Arduino Uno on Atmega 328B.
plz guide me.
N.N.Joglekar

What do you mean by "on delay timer"? What should happen when the proper amount of time has elapsed?

Is the start condition pulsed or maintained? Should the timer be interrupted if the start condition is true?

I am using 2 inputs say a & b. I want to start on delay timer on input a & if want to stop timer before its
stipulated time if input b is true.

The first step to obtaining help is to post your current code.

It sounds like you may be using delay() to implement the "delay timer". If so, then you are using the wrong technique and need to switch to using millis() for timing, but without seeing your code we can't tell.

const int A_PIN = 3;
const int B_PIN = 4;
const unsigned long STIPULATED_TIME = 5000;

void setup() {
  pinMode(A_PIN, INPUT);
  pinMode(B_PIN, INPUT);

  while (digitalRead(A_PIN) == LOW) {
    // Do nothing waiting for start signal to go HIGH
  }
  unsigned long startTime = millis();

  while (millis() - startTime < STIPULATED_TIME) {
    // If the start now signal goes HIGH...
    if (digitalRead(B_PIN) == HIGH)
        break;  // ... stop waiting.
  }

  // Start the thing
}

void loop(){}

I want to start counting time after pin13 goes HIGH.

I think you mean that you want to record when pin 13 BECOMES HIGH. Look at that state change detection example to determine that.

You could then periodically see if now minus then (when pin 13 became HIGH) exceeds some threshold, and take some action if that is true.

I expect help from Arduino community.

Well, we expect YOU to describe, or learn if necessary, what the code is ACTUALLY doing, and how that differs from what you want it to do.

The demo Several Things at a Time may help with understanding the use of millis() for timing.

...R

To use an on-delay-timer, like you would find in an electro-mechanical circuit or on a PLC, you have to recreate each quality of the timing circuit.