in addition to what raffia has replied, "工夫" also means effort/energy, normally you use this phrase "这功夫" to show disapproval of something that someone has done or something you have done which didn't yield the result you were hoping for.
你有这功夫,怎么不干点实在事。Why don't you go and do something worth doing instead of wasting your time/energy on whatever he/she was doing at that particular moment.
我废了半天功夫,还是不行。 All of my efforts were to no avail.