A mechanical nanosensor in the gigahertz range: where mechanics meets electronics