Every spring I struggle with my superpower: killing perfectly healthy plants by watering them too much. Every year, around July or August, I accept the same conclusion: I should give up trying to cultivate plants and, next year, I should spare plants the misery of being nurtured by me. But then spring comes again and brings with it the scent of flowers, the sight, and odor of cooking herbs and therefore the temptation to try again. This year instead of suppressing my craving I will adopt a smarter approach. I bought a sensor to monitor the plants’ moisture which I will use to prevent me from drowning the plants. With the moisture values as a starting base, I will apply the scientific method to the subtle art of watering plants.
A simple fork example timed with chrono
I always wanted to experiment with parallel computing and multi threading. However, when and how to use parallel computing has always been a bit difficult to conceptualize for me. Until I discovered forking. Here I will describe a simple implementation of fork using the chrono Time c++ library to time the forked processes.