How to accurately count the time period (hardware)? Input : Square wave which sweeps over time domain. (about 1 MHz)
Output: The time period of high/low value.

Like the timer does, I would like to know the actual time (in sec) when the input goes high or low as well as the proper way to implement it. 

For example, use FPGA or Microcontroller to read it via analog input.
OR there is the tool that straight to the point! Please let me know.
If it is not a noisy signal you could use a technique called "zero crossing" to gate a counter. You may use an FPGA to create accumulators to add up times and down times.