I just want to do the double reset of the ESP8266 through code (sketch) .Is there any command or function for this ?is it possible??
There are not enough details in the question so we need to guess the goal of the project. Assuming the goal is to have alternative behaviors depending on pressing the reset button once or twice with in a given span of time.
This project at github likely uses the RTC and some of the RTC flash memory in an ESP8266 to determine if the reset button has been pressed once or twice in a given span of time.
From that project:
PURPOSE: Detects a double reset so that an alternative start-up mode can be used. One example use is to allow re-configuration of a device's wifi.