You explained the condition when you want to send the AP to sleep in the previous post
Have those conditions been met?
With the information you gave, 'i took current time in my function and used that to schedule AP when it should be gone to sleep mode. but it is 0", I can't help you further.
Where is 'your function' ? When is it called?
Stop thinking with sequential C programming. ns-3 is an event-based object oriented program.
Your 'scenario' file is used to 'drive' the simulation. If you want to have processes during run-time, you need to use (traced) callbacks to catch those events (e.g. reception of probe messages, conditions being met, etc).