Here's their implementation of it:
https://github.com/esp8266/Arduino/blob/master/cores/esp8266/core_esp8266_wiring_pwm.c
They use one of the hardware timers, but twiddle the pin in the ISR.
@DrAzzy started
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
Here's their implementation of it:
https://github.com/esp8266/Arduino/blob/master/cores/esp8266/core_esp8266_wiring_pwm.c
They use one of the hardware timers, but twiddle the pin in the ISR.