Fog computing is a good solution for response time-critical applications, which need a lot of processing time. Fog allows mobile devices to offload some tasks and, consequently, to increase battery life-time. By the way, unlike classical cloud solutions, fog computing provides very low latency thanks to its distributed computing infrastructure. In the paper, we assume that tasks are not uniform and they significantly differ in amount of required work. We propose the offloading criterion based on amount of required work for a task, so that 'heavy' tasks are offloaded to the fog and 'light' tasks are processed locally on mobile devices. The proposed offloading scheme is analyzed in terms of queuing systems, formulas for the main performance measures are obtained. © 2018 IEEE.